1. hibernate : @Version and merge coderanch.comOriginally, I use merge for saveNew and update, it works. Then I add version controll number in, saveNew is fine, but update will generate a new instance, not an update. In my object, I have one-to-one and one-to-many, what I want is, when save new or update, always get latest copy (including parent and child object), merge together, and then do ... |
2. JPA create new record version instead of Merging (update) coderanch.comhello, as you can expect, I am a newbe to JPA, and really stuck as well. I have a requirement for a web app that needs to maintain all versions that have been created. like having an article's table where every iteration of content changes need to be kept for future reference. for instance my table might be like: create table ... |
3. merge causes unecessary update with |