Sorry my HQL sample was wrong, I missed the fetch bit out of the join, it should have said
select c from Company c left join fetch c.employees e left join fetch element(e).responsibilities r where c.id = :id Michael On Monday, 28 May 2012 09:37:57 UTC+1, Michael Charalambous wrote: > > Hi > > Is it possible to ask NHibernate to eager load a property of an element > held within a map collection? I have done a fair bit of googling and tried > a few different variations with no success. > > My current attempt in HQL is below, the third line, where I try to fetch > "responsibilities", is the issue. > > select c from Company c > left join c.employees e > left join element(e).responsibilities r > where c.id = :id > > Any advice would be appreciated. > > Thanks > Michael > -- You received this message because you are subscribed to the Google Groups "nhusers" group. To view this discussion on the web visit https://groups.google.com/d/msg/nhusers/-/89m4XceHGP8J. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
