Hello,
I have a question regarding eager fetching an association in an object graph. I am not sure that posting all the config files will help my issue, but perhaps someone ran into this and has an explanation.
I have an association where object A is 1..n to object B, object B also has 5 many-to-one associations. My HQl looks similar to below:
from A a
left join fetch a.bs
left join fetch b.1
left join fetch b.2
left join fetch b.3
left join fetch b.4
left join fetch b.5
where some criteria
My issue is that for a set of objects A after query above is executed, some bs collections are initiazlied and some are not. I am not sure why.
By the way some objects A have items B in the database, some A's do not. What drives a collections being initialized?
THanks
|