Actually the relationship with userextension is really one-to-one, but with a userextension having it's own unique key, that made me need to do the one-to-many relationship. It's not the saving of the data that I'm having the problem with. When I change my user table to have a composite key of username/mainClientID, save a record, then do to do an update, I get a unique constraint violation because instead of hibernate issuing an "update", it's doing a delete/insert. BUT, it does them in the order of insert (get the violation), then delete.
So, i'm asking how I can force hibernate to issue an "update" instead of delete/insert.
OR, can I force the delete to happen before the insert (I've read that you can't control this)
OR what kind of work-around is there on having a <composite-id> like entity in my mapping file in addition toi <id>
Thanks in advance for any help!
|