[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-7194) NullPointerExeption with nested subqueries using Criteria API
Shawn Clowater (JIRA)
noreply at atlassian.com
Thu Mar 22 19:38:48 EDT 2012
[ https://hibernate.onjira.com/browse/HHH-7194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46061#comment-46061 ]
Shawn Clowater commented on HHH-7194:
-------------------------------------
Created a pull request at https://github.com/hibernate/hibernate-orm/pull/294
Triggering the error was a bit more effort than I originally thought it would be. I was under the assumption that simply having a nested Subquery was enough but it also needed an entity in the where clause of the nested subquery to trigger the NPE. Either way, test case illustrates the behaviour.
> NullPointerExeption with nested subqueries using Criteria API
> -------------------------------------------------------------
>
> Key: HHH-7194
> URL: https://hibernate.onjira.com/browse/HHH-7194
> Project: Hibernate ORM
> Issue Type: Bug
> Components: query-criteria
> Affects Versions: 4.1.1
> Environment: N/A
> Reporter: Shawn Clowater
>
> It appears a regression was introduced under HHH-3646
> Under that change the CriteriaQueryTranslator was changed to track the root entity names in CriteriaInfoProvider objects vs plain Strings. The old functionality would allow for returning a null out of the map and then handling an entity not found exception that was thrown further down the stack and then it would try to find the root entity name from the outer criteria. Now, it blows the NPE on the getName() call and prevents the query from executing.
> I've got a working fix for it but I still need to put together a test for the change, I'll create a pull request in the next day or so with the fix.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list