Hi,
when running this HQL query:
from Rule r
left join fetch r.type t
left join fetch t.featureAttributeList attribute
left join fetch attribute.enumerationValues
left join fetch r.objectConditions oc
left join fetch oc.geometryConditions
left join fetch oc.attributeChecks
where r.id = ?
I got a list of duplicated Rule objects, and this is expected, but I also got
duplicated items in the featureAttributeList collection, and this is new to me.
Have I spotted a bug? Every collection is a List mapped with the @OneToMany annotation with all/delete_orphan cascade style, and from the debugger it seems this results in a PersistentBag type of collection. Each collection is mapped from the parent to the childs, but not the other way around (so these are not bi-directional).
What should I do? I need to efficiently retrieve a Rule, but this behaviour makes it more or less impossible...
Oh, btw, the other collections (object conditions, geometry conditions, attribute checks) are empty at the moment.
|