-->
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.  [ 4 posts ] 
Author Message
 Post subject: Integer id and int version..
PostPosted: Wed Nov 10, 2010 6:30 am 
Pro
Pro

Joined: Mon Apr 16, 2007 8:10 am
Posts: 246
Hello,

I just got my classes generated by Hibernate Tools and I noticed something with the id and version properties of the domain classes.

One is an Integer and the other one is an int.

Code:
   private Integer id;
   private int version;


Any reason for this ?


Top
 Profile  
 
 Post subject: Re: Integer id and int version..
PostPosted: Wed Nov 10, 2010 8:14 am 
Senior
Senior

Joined: Fri Oct 08, 2010 8:44 am
Posts: 130
Yes, version should not be nullable normally.


Top
 Profile  
 
 Post subject: Re: Integer id and int version..
PostPosted: Wed Nov 10, 2010 9:51 am 
Pro
Pro

Joined: Mon Apr 16, 2007 8:10 am
Posts: 246
And Id could be nullable ?


Top
 Profile  
 
 Post subject: Re: Integer id and int version..
PostPosted: Wed Nov 10, 2010 10:31 am 
Senior
Senior

Joined: Fri Oct 08, 2010 8:44 am
Posts: 130
stephaneeybert wrote:
And Id could be nullable ?


Yes.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.