Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

That's all. After the edit, the domain model will be stored in the session. On the save, the model will be restored before the new values are applied.

Model Repository vs. params-prepare-params

An alternative to the model repository is to use the params-prepare-params interceptor stack. The params-prepare-params interceptor stack requires the object you are editing to be re-read from the database. In cases where optimistic locking is used, this completely circumvents the version field. In these cases, the originally read object should be used when saving the object.