-->
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.  [ 1 post ] 
Author Message
 Post subject: proxy can be returned by Session.get(..), incorrect in book.
PostPosted: Thu Jan 29, 2009 7:00 am 
Regular
Regular

Joined: Thu Aug 28, 2003 2:42 pm
Posts: 77
Location: The Netherlands
The book Hibernate Java Persistence contains a little mistake:
Section 13.1.3 mentions that Session.get() always hit the database which isn't true, like correctly mentioned in the 3.3.1.GA api doc's.
That is, like I experience myself, the Session.get() can return a proxy if the instance was already loaded as proxy.
This happens when for example the entity in the get was previous already retrieved as proxy during a many-to-one mapping, and stored in the hibernate proxy cache. Hibernate will also perform a proxy-narrow operation if needed.

Cheers,
Ed


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

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.