-->
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: Is dual mapping the only way?
PostPosted: Mon Mar 19, 2007 10:58 am 
Newbie

Joined: Fri Oct 08, 2004 1:12 pm
Posts: 4
Hello,

I have an object A mapping to object B with many-to-one relationship. In the database schema table A has a B_ID column for this purpose. So normally if I want to get the ID of a B from A I'd do a.getB().getID().

The question is: for performance reason, can I get B_ID from A without first instantiating the B object? The only way I can think of doing this right now is map the B_ID column to both a bID field and a B object. But is there a better way of doing this?

Thanks!

Ken


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.