-->
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: difference between not specifying lazy="no-proxy"
PostPosted: Sat Aug 30, 2008 12:02 am 
Beginner
Beginner

Joined: Wed May 14, 2008 2:06 pm
Posts: 21
I am using hibernate 3. I read the documentation it did not help me .Please help me understand difference between not specifying a lazy and specifying a lazy="no-proxy" ?Please help me understand this .


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 30, 2008 2:26 pm 
Expert
Expert

Joined: Wed Mar 03, 2004 6:35 am
Posts: 1240
Location: Lund, Sweden
If you don't specify a value for lazy it defaults to lazy="proxy". This means when you call getSomeObject() you will actually get a proxy object that will only be initialized once you call some method on it.

If you specify lazy="no-proxy" and has done the required "byte-code instrumentation", Hibernate will load and initialize the SomeObject when you call getSomeObject(). Personally I have never used the no-proxy option and I can't find any good reasons for using it. As the Hibernate documentation says: "it is only for marketing purposes".


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.