i have three classes A,B,C
Association between A and B is Many-to-one .
Association between B and C is one-to-Many.
Code:
<class name="A" lazy="false" table="a">
<id column="A_ID" length="10" name="aId" type="integer">
<generator class="sequence">
<param name="sequence">A_ID_SEQ</param>
</generator>
</id>
<many-to-one name="b" class="B" column="B_ID" insert="false" update="false" />
</class>
Code:
<class name="B" lazy="false" table="b">
<id column="B_ID" length="10" name="bId" type="integer">
<generator class="sequence">
<param name="sequence">B_ID_SEQ</param>
</generator>
</id>
<set name="c" lazy="false" cascade="none">
<key>
<column name="B_ID" />
</key>
<one-to-many class="C" />
</set>
</class>
Code:
<class name="C" lazy="false" table="c">
<id column="C_ID" length="10" name="bId" type="integer">
<generator class="sequence">
<param name="sequence">C_ID_SEQ</param>
</generator>
</id>
</class>
i want to fetch class B and C lazily using criteria . i am not able to fetch it lazily using criteria.
is there any way that i can get these object lazily using criteria