Trying to fetch a List<Map<String, Object>> using the following query causes a LazyInitializationException.
select distinct root from _testCatalog_Task root inner join fetch root.subtasks subs left join fetch subs.activities
This exception only occurs when the nested association is a one-to-many association and the entities are fetched as a Map.
Mapping Pojos to the hibernate mappings defined in the hbm.xml files and using those as a result resolves this bug, but i have to use Map representation.
I have also found out that the following query will give me the result that i would expect from the first query:
select distinct root from _testCatalog_Task root inner join fetch root.subtasks subs left join subs.activities
So using lazy fetching on the nested one-To-Many association 'subs.activities' works as i would expect it from eager fetching.
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira