Hi all,
i'm new to hibernate ad i have a frustating problem that, i think, has a simple solution.
I have an object with three collections like described by the mapping file below
Code:
<class name="AClass" table="atable">
<id name="aclassid" column="aclassid">
<generator class="native"/>
</id>
<set name="s1" cascade="all,delete-orphan">
<key column="aid" not-null="true"/>
<one-to-many class="S1"/>
</set>
<set name="s2" cascade="all,delete-orphan">
<key column="aid" not-null="true"/>
<one-to-many class="S2"/>
</set>
<set name="s3" cascade="all,delete-orphan">
<key column="aid" not-null="true"/>
<one-to-many class="S3"/>
</set>
</class>
the problem is when i call session.refresh on that object.
Looking in the sql generated by hibernate seems that only the query to populate the first collection in the mapping file is done, the others are skipped.
So if i change the order in the mapping file by placing S2 first, only S2 is populated
Anyone has some solutions?
Thanks