-->
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: LockMode.UPGRADE
PostPosted: Mon Aug 16, 2004 5:59 pm 
Beginner
Beginner

Joined: Mon Aug 09, 2004 3:35 pm
Posts: 22
Location: Minneapolis, MN, USA
Is there any way to force Hibernate to retrieve all the properties from
the DB? I'm trying to prototype some of the basics for a CRC version
of optimistic locking, but when I call session.load() with a lock mode,
the SQL trace shows that it's only selecting the ID.

thanks,

robert


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 16, 2004 6:01 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Correct, Hibernate only selects the id if the object is already in the session cache.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 16, 2004 6:20 pm 
Beginner
Beginner

Joined: Mon Aug 09, 2004 3:35 pm
Posts: 22
Location: Minneapolis, MN, USA
gavin wrote:
Correct, Hibernate only selects the id if the object is already in the session cache.


Thanks, Gavin. So, I just evict() it and then it does just what I want.

-r


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.