-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: lazyFetching using Criteria
PostPosted: Tue Jul 26, 2011 6:39 am 
Newbie

Joined: Tue Jul 26, 2011 6:05 am
Posts: 2
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


Top
 Profile  
 
 Post subject: Re: lazyFetching using Criteria
PostPosted: Fri Jul 29, 2011 2:40 am 
Newbie

Joined: Tue Jul 26, 2011 6:05 am
Posts: 2
Any one of the experts can you please help me on this lazyfetching with criteria


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.