-->
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: Can I update an object that has no primary key in table
PostPosted: Sun Jul 25, 2004 6:22 am 
Beginner
Beginner

Joined: Wed Jul 21, 2004 7:48 am
Posts: 21
Hi friends,
I have a problem in updating a row that has no primary key.But I need to map one property as a primary key in my class which is mapped to that table other wise I get an error while generating mapping file (by running ant).
Now there is no problem while saving, but when I try to update it throws exception.
Are there any alternative ways to solve it?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 25, 2004 6:25 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
You could map all attributes as a composite-key. Please remember that your database is broken, if you don't have a primary key declaration for a table. Better clean it up.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


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.