-->
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: Mapping a class without an id attribute
PostPosted: Thu Feb 14, 2008 11:22 am 
Newbie

Joined: Thu Feb 14, 2008 11:15 am
Posts: 1
In Java 1.4, I am attempting to map a class in our legacy code base that does not have an id attribute to a table in our database that has an auto-incrementing id column. Is there any way to do this without actually adding the id attribute to the class file?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 14, 2008 11:36 am 
Expert
Expert

Joined: Fri Aug 19, 2005 2:11 pm
Posts: 628
Location: Cincinnati
fyi: hibernate can handle auto-incrementing ids that are generated by the database.

but, to answer your question, no I don't think so. How would hibernate differentiate between unique objects.

_________________
Chris

If you were at work doing this voluntarily, imagine what you'd want to see to answer a question.


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.