I have a Hybris system and in every database table there is a column named "hjmpts". The column contains INT values. Does someone know reason for this column?
It's meant to support optimistic locking in the same way as a persistence layer like Hibernate does with a @Version
annotation.
Basically when you select a row with from the database and that returns you the current version. When the row is updated then the version column is incremented. When you update the row you use a WHERE clause on the query to match the version that you selected. If the update doesn't modify any rows then you know something else has updated the row (and version) in the meantime.
hjmp.throw.concurrent.modification.exceptions
(default false) is config parameter which either enables or disables checking that upon update a item row must have the same version that has been read when fetching the HJMP entity object.
This means setting hjmp.throw.concurrent.modification.exceptions
parameter to true
in properties activates optimistic locking and of course increasing the risk of seeing optimistic concurrency exceptions such as HJMPException(PK was modified concurrently - expected version ... ), which will force a transaction rollback
P.S: If you don't enable optimistic locking, only the dirty attributes will be written and the final result will be a merge.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With