This step is identical to that in You want to read some data from a database table above.
This step is identical to that in You want to read some data from a database table above.
You must code a call for the entity instance to cancel its data on the database:
// do the cancel, passing the version number from the client someEntity.cancel(key.versionNo);
For an entity which supports optimistic locking, you must pass the version number held by the client struct.
/** ********** VERY VERY BAD - DO NOT DO THIS! ********** */ // do the cancel, passing the version number from the entity // instance someEntity.cancel(someEntity.getVersionNo()); /** ********** VERY VERY BAD - DO NOT DO THIS! ********** */