« Previous | Next » 

Revision ad0c7178

Parent f90545ec
Child 6e1f4b9a

Added by Alexander Stehlik about 7 years ago

[!!!][BUGFIX] Skip automatic persistence for updated entities

When trying to persist changes in a "safe request" (e.g. ``GET``) Flow
throws an exception::

Detected modified or new objects [...] to be persisted which is not
allowed for "safe requests"

including details on how to work around this.

This currently only works if entities have been added or removed.

With this change also updates to entities are tracked correctly so
that automatic persistence is skipped for modified objects for safe

This is a breaking change when code relied on the incorrect behavior of
automatically persisting changes even for safe requests.
In this case make sure to trigger updates only via unsafe requests (e.g.
``POST`` or ``PUT``).
If that's not an option, the issue can be worked around with a manual
call to ``PersistenceManager::persistAll()``.

Change-Id: I9eb781c54c608c867a45206f64b6baf98c3d07f2
Releases: master, 2.2, 2.1
Fixes: FLOW-84
Related: #47252
Related: #51570

  • added
  • modified
  • copied
  • renamed
  • deleted