-->
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: Newbie question about ID's
PostPosted: Mon May 16, 2005 5:04 am 
Newbie

Joined: Wed Mar 23, 2005 4:29 am
Posts: 7
A very simple newbie question: I'm using Hibernate 3. For every class I specified an unique identifier via the id tag in my mapping.
Do I have to include this identifier (named id) as an attribute in each class or isn't that needed?
In all the Hibernate tutorials I read they do that but it would be easier to forget it ;-)


Top
 Profile  
 
 Post subject: hmmm..
PostPosted: Mon May 16, 2005 5:29 am 
Beginner
Beginner

Joined: Mon Mar 07, 2005 12:02 pm
Posts: 39
I’m sitting in the same boat, I can put the column in the database and in the mapping but I got the classes given to me, I may not change them and not all the classes have a id field in them so I would like to just leave it out but I am sure that hibernate use these id's to retrieve the classes somehow. As you all can probably see, I’m a newbie as well.


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 16, 2005 7:56 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
this is not mandatory but lot's of cool/useful features rely on an explicit id property

_________________
Emmanuel


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.