-->
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: primitives vs. primitive wrapper objects
PostPosted: Tue Jan 24, 2006 2:37 pm 
Newbie

Joined: Fri Dec 17, 2004 12:54 pm
Posts: 13
Hi,
I'm in the early stages of designing my data model with hibernate and would like to use object wrappers (Integer instead of int, etc) for my numeric properties and am wondering if that comes with a performance penalty in hibernate.

Does anyone know if this is anything to be concerned about? Should I push for using primitives or does it not really matter? - Duncan


Top
 Profile  
 
 Post subject: it depends
PostPosted: Tue Jan 24, 2006 3:02 pm 
Expert
Expert

Joined: Fri Jul 22, 2005 2:42 pm
Posts: 670
Location: Seattle, WA
I would guess that using Objects will not have any significant performance impact.
Objects must be used if corresponding columns in the database are nullable.

_________________
--------------
Konstantin

SourceLabs - dependable OpenSource systems


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 24, 2006 3:52 pm 
Newbie

Joined: Fri Dec 17, 2004 12:54 pm
Posts: 13
Thanks,
I did not know that nullable columns need to be objects, but now that I think about that it makes sense. I'm going to stick with your advice and use Object wrappers instead of primitives in my model classes.


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.