From: <hib...@li...> - 2006-06-28 02:38:13
|
Author: ste...@jb... Date: 2006-06-27 22:37:56 -0400 (Tue, 27 Jun 2006) New Revision: 10059 Modified: trunk/Hibernate3/src/org/hibernate/hql/ast/tree/IdentNode.java Log: HHH-1746 : illegal property qualification causes NPE (HQL) Modified: trunk/Hibernate3/src/org/hibernate/hql/ast/tree/IdentNode.java =================================================================== --- trunk/Hibernate3/src/org/hibernate/hql/ast/tree/IdentNode.java 2006-06-27 21:25:01 UTC (rev 10058) +++ trunk/Hibernate3/src/org/hibernate/hql/ast/tree/IdentNode.java 2006-06-28 02:37:56 UTC (rev 10059) @@ -192,6 +192,9 @@ } Type componentType = getNakedPropertyType(fromElement); + if ( componentType == null ) { + throw new QueryException( "Unable to resolve path [" + parent.getPath() + "], unexpected token [" + getOriginalText() + "]" ); + } if (!componentType.isComponentType()) { throw new QueryException("Property '" + getOriginalText() + "' is not a component. Use an alias to reference associations or collections."); } |