-->
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: how can use "Hibernate.initialize" in .hbm.xml fil
PostPosted: Wed Mar 14, 2007 4:48 am 
Newbie

Joined: Wed Mar 14, 2007 4:35 am
Posts: 7
Hello everybody.

I'm starting with hibernate and I have a question. I have this code in a .java file

...
ESObject obj2 = (ESObject) session.get(ESObject.class, new Integer(object.getId()));
Hibernate.initialize(obj2.getFields());
...

but I would like to do "Hibernate.initialize(obj2.getFields());" in my hbm.xml file instead of .java file. Is this possible?How can I do it? Is there any parameter for this?

Thanks in advance.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 14, 2007 8:21 am 
Expert
Expert

Joined: Tue Jan 30, 2007 12:45 am
Posts: 283
Location: India
hi artabro,

use lazy =false in field property

_________________
Dharmendra Pandey


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.