Guillaume Smet my issues basically occur when using hibernate XML Mapping configuration. While preparing the reproducer test and debugging, I found that the "laziness" of OneToMany does not propagate into the entity persister. In case of Annotation configuration it does. Just to be sure: is it enough to set <set ... lazy="true"/> or <set ... lazy="extra"/> and expect that the collection and the proeprty should now be lazy for SimpleEntity.children as configured below, or am I missing something out?
<hibernate-mapping package="org.hibernate.bugs">
<class name="SimpleEntity">
<id name="id" column="ID" type="java.lang.Long" />
<property name="name" type="string">
<column name="name" length="50" />
</property>
<set name="children" inverse="true" cascade="all" lazy="true" collection-type="org.hibernate.custom.collection.AccessiblePersistentSet">
<key column="PARENT" />
<one-to-many class="ChildEntity" />
</set>
</class>
<class name="ChildEntity">
<id name="id" column="ID" type="java.lang.Long"/>
<property name="name" type="string">
<column name="name" length="50" />
</property>
<many-to-one name="parent" class="SimpleEntity" cascade="none" />
</class>
</hibernate-mapping>
And how does that @ "user mention" work? Am I not permitted? |