mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
[PR #1577] EntityManager#merge() and EntityManager#detach() removal
#9633
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Original Pull Request: https://github.com/doctrine/orm/pull/1577
State: closed
Merged: Yes
This PR simply attempts to get rid of
EntityManager#merge()andEntityManager#detach()operations.While
mergeanddetachcan be useful in contexts where entities are being serialized:EntityManager#clear()is a much better API for long-running and multi-threaded processesEntityManager#merge()was to merge data without further queries (when avoidable): the Second Level Cache now solves that problem in a more elegant way.TODO:
ObjectManager#detach()andObjectManager#merge()~~~ (or provide empty implementation that throws, for now)