I am facing an issue when doing repeated merge with optimistic-force-increment set. Here are the steps:
1) Update an entity E1 2) Fire a criteria builder query that causes E1 to be flushed. (I can not set ignoreChanges to true due to the requirements) 3) Update E1 again 4) Commit This results in an optimistic locking exception becase 2) above is forcing an increment of the version and in 4) JPA compares this version to the value in the database which does not match and as a result throws the error. Is there a setting I could turn on to say increment the version with commit (and not with flush), or move to another version of JPA where this is fixed or no longer an issue. -- View this message in context: http://openjpa.208410.n2.nabble.com/Repeated-merge-causing-Optimistic-lock-errors-tp7587466.html Sent from the OpenJPA Developers mailing list archive at Nabble.com.
