wood burning stoves 2.0*
The moose likes Object Relational Mapping and the fly likes OJB and Unique Keys Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "OJB and Unique Keys" Watch "OJB and Unique Keys" New topic
Author

OJB and Unique Keys

Salmon Chase
Greenhorn

Joined: Jul 25, 2006
Posts: 2
I'm trying to update a row in a table which has a primary key, 4 unique keys (unique constraint) and a few more data fields. I have naturally one primary key specified for the table in my repository_user.xml file. When I store the row, I get a Unique restraint violation for the unique constraint on the 4 uks. The primary key value is generated using a sequence. Is there any way to configure the table so that it will update the row? Are there any settings you need to do this operation?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: OJB and Unique Keys
 
Similar Threads
Update based on Row id
using hibernate with tables have no relation
Primary - Unique
JDO issue
updating records, for a table without primary key.