-->
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: ID - object or primitive?
PostPosted: Thu Nov 24, 2005 8:17 am 
Newbie

Joined: Wed Mar 09, 2005 11:32 am
Posts: 18
Hello.

Should we prefer to use int instead fo Integer in our primary key

mapping? is the improve in the performance it worth doing so?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 24, 2005 8:28 am 
Senior
Senior

Joined: Thu Aug 04, 2005 4:54 am
Posts: 153
Location: Birmingham, UK
There is no performance gain for using int instead of Integer when compared to the time taken for everything else. Also with reflection in some cases it can be faster to use Integer. Personally I prefer Integer as it allows me to use null to represent transient instances.


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.