-->
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.  [ 3 posts ] 
Author Message
 Post subject: problem in lazy="true"
PostPosted: Fri Apr 03, 2009 7:49 am 
Newbie

Joined: Thu Apr 02, 2009 1:06 pm
Posts: 6
Hi ,
there are two pojos Employee,Adresses.
and corrensponding table.
Adress table is referring to the Employee table
by default lazy="false" hibernate provides ,means if we are getting the employee table data automaticaly address table data also will come.

in case of lazy="true" if we try to retrieve only employee table data will come because it will not fetch the child table(Address) data.

but in my lazy=false it is working fine,

if i place lazy="true" it is working as lazy="false".it should not work like that .
Can any body pls let me know how to use lazy="true" in hbm.xml inorder not to fetch the child table data.

Thanks In Advance................










Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:

Mapping documents:

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

Name and version of the database you are using:

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


Problems with Session and transaction handling?

Read this: http://hibernate.org/42.html


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 03, 2009 8:18 am 
Expert
Expert

Joined: Thu Jan 08, 2009 6:16 am
Posts: 661
Location: Germany
Are you using a one-to-one relationship? If yes, thistopic might help you, especially the first answers by nordborg and me.

If not, we need some more information (mapping, examplecode) to help you.

_________________
-----------------
Need advanced help? http://www.viada.eu


Top
 Profile  
 
 Post subject: problem in lazy="true"
PostPosted: Fri Apr 03, 2009 8:29 am 
Newbie

Joined: Thu Apr 02, 2009 1:06 pm
Posts: 6
i tested with one-to-one,one-to-many in both these cases i used lazy="true",but not get the required data(only parent data not child data).

if there is any code reference for this problem,plz let me know in solving this problem.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.