Reputation: 967
Is there a way to ignore the @version field in an entity while performing merge. I am using eclipse link.
Upvotes: 1
Views: 86
Reputation: 22451
If you're looking for a way to ignore the OptimisticLockException when the version in the database is different from the one you're trying to merge, the short answer is that there is no way to do that, to my knowledge.
A workaround is to retrieve a "fresh" version of the entity from the database, copy the modified values to it, and then commit.
Upvotes: 2