Hi, i am not very experienced using Hibernate, so please forgive me if my question is stupid ;)
I've got a problem with updating the record (one field is a primary key and the second is unique) in the same transaction:
because i want to update primary key, i have to delete the old record(object) and create a new one.
but this table has second field - which is unique.
that's where the problem is - hibernate seems to delete the object when the commit is executed and when it's got a new object created with the same field values (except the primary key which is the one i wanted to update) there is a database exception, because the value of unique field is the same as it was in the old ([not yet] deleted) object...
any suggestions how to make it work (using one transaction)?
thanks...
|