-->
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: foreign key ids
PostPosted: Sun Mar 26, 2006 4:01 pm 
Newbie

Joined: Sun Mar 26, 2006 3:56 pm
Posts: 1
i want to know the id value of a foreign key column on an entity without having to load the other entity. any way other than entity.getDependentEntity().getId()? no point going to the db for that.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 26, 2006 10:16 pm 
Expert
Expert

Joined: Thu Dec 23, 2004 9:08 pm
Posts: 2008
I was under the impression that calling getId() (or whatever you've called the id in your mapping) does not de-proxy an object. You can call that method and it doesn't go to the DB.

You can also do this in HQL, using the special "id" member of mapped entites: see section 14.8 of the ref docs.


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.