-->
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: Why do many hibernate examples use long for the id?
PostPosted: Mon May 23, 2005 7:55 pm 
Newbie

Joined: Mon May 23, 2005 7:31 pm
Posts: 3
In most of the Hibernate examples I have read, an id type of long is used. Is there any particular reason for this?

This is currently being created as a Numeric (decimal) in my SQL Server DB, I would prefer an integer. Is there any reason, apart from length, why I should use long?

Thanks....


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 23, 2005 9:00 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Length/size of the type is the primary reason. Use what ever you feel is appropriate as your the one that is aware of the design limitations and constraints.


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.