updating primarey key is not really nice but i think you don't have the choice.
Instead of load + set + commit you should try load + new instance + copyAllProperties + set the key you want to modify + save(newObj) + delete(oldObj) + commit
In my opinion it's more OO logic even if it seems a little bit complicated
2009-07-22
Hibernate HOWTO Update Composite-id
訂閱:
發佈留言 (Atom)
0 留言:
發佈留言