[hibernate-issues] [Hibernate-JIRA] Updated: (HHH-4491) NPE in HQL subselect

John Hutcheson (JIRA) noreply at atlassian.com
Mon Oct 12 23:39:41 EDT 2009


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4491?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

John Hutcheson updated HHH-4491:
--------------------------------

    Attachment: CivicrmAclEntityRole.hbm.xml
                CivicrmGroup.hbm.xml

mapping files for entities in query

> NPE in HQL subselect
> --------------------
>
>                 Key: HHH-4491
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4491
>             Project: Hibernate Core
>          Issue Type: Bug
>         Environment: HIB3.2.3 & 3.2.4 H2 on win32
>            Reporter: John Hutcheson
>         Attachments: CivicrmAclEntityRole.hbm.xml, CivicrmGroup.hbm.xml
>
>
> this fails: 
> <code>
> select cg, (exists(select caer from nz.org.wpc.crm.dao.CivicrmAclEntityRole$Group as caer 
> 					where caer.aclRoleId = :roleId
> 					  and caer.entityId = cg.id)) 
> from CivicrmGroup as cg 
> </code>
> exception is
> java.lang.NullPointerException
> 	at org.hibernate.hql.ast.ParameterTranslationsImpl.getNamedParameterExpectedType(ParameterTranslationsImpl.java:63)
> 	at org.hibernate.engine.query.HQLQueryPlan.buildParameterMetadata(HQLQueryPlan.java:296)
> 	at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:97)
> 	at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:56)
> 	at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:72)
> <B>this works:</B>
> <code>
> select cg, (exists(select caer from nz.org.wpc.crm.dao.CivicrmAclEntityRole$Group as caer 
> 					where caer.aclRoleId = 1
> 					  and caer.entityId = cg.id)) 
> from CivicrmGroup as cg 
> </code>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list