-->
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: Business Key with relationship id
PostPosted: Sat Oct 16, 2004 6:58 pm 
Regular
Regular

Joined: Thu Aug 26, 2004 9:23 pm
Posts: 71
In the book when talking about possible business keys for the Bid class the item ID along with the bid amount is mentioned. My question is if you decided to use the item ID instead of a created date I would assume you'd have to get that id by traversing the relationship to the item object in the equals() and hashcode() methods. Do you think that would affect performance enough to deter people from using associate ids? Or do you think that would be a fine business key practice?

Regards,
Mike


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 16, 2004 7:00 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
You can call the associated objects identifier property without initializing the associated object (if its set to lazy/proxy), so no performance hit.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


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.