Feature #4167

Implement an update() method for the base repository

Added by Robert Lemke about 12 years ago. Updated about 11 years ago.

Status:
Resolved
Priority:
Must have
Assignee:
Category:
Persistence
Start date:
2009-08-06
Due date:
% Done:

100%

Estimated time:
PHP Version:
Has patch:
Complexity:

Description

The base repository (\F3\FLOW3\Persistence\Repository) should provide an update() method which allows for convenient updates of an existing object.

The update method expects one argument which is a not-yet persisted clone of the original object. The fact that it is a clone of the original is important because only then it has the same UUID like the original object. If the object is not a clone, you must use replace() instead.

Calling update() will check the uuid of the given object, fetch the currently persisted object with the same uuid, will disconnect the existing object from the repository and persistence framework and connect the new object instead.

#1

Updated by Robert Lemke about 12 years ago

  • Status changed from Accepted to Resolved
  • % Done changed from 0 to 100

Applied in changeset r2989.

Also available in: Atom PDF