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 remove its data from the database:
// do the remove, passing the version number from the client someEntity.remove(key.versionNo);
For an entity which supports optimistic locking, you must pass the version number held by the client struct. Note that this approach is stricter than the classic Cúram approach which does not require a version number.
/** ********** VERY VERY BAD - DO NOT DO THIS! ********** */ // do the remove, passing the version number from the entity // instance someEntity.remove(someEntity.getVersionNo()); /** ********** VERY VERY BAD - DO NOT DO THIS! ********** */