mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
Custom entity persister? #6428
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?
Originally created by @gjdanis on GitHub (Mar 19, 2020).
Feature Request
Summary
Right now it's not possible to declare a custom persister for an entity. The specific use case I'm asking about is for MS SQL Server where one of my tables has a trigger that inserts into another another table. For this entity I want to use
OUTPUTin myINSERTstatements to get the correct identity value.It seems like we should be able to inject this somewhere in the UnitOfWork or perhaps provide it as metadata on the entity:
99b7d1e9d4/lib/Doctrine/ORM/UnitOfWork.php (L2562)@morozov tagging you for visibility.
@beberlei commented on GitHub (Sep 25, 2020):
This is by design, building a persister is really difficult and we want to avoid introducing this extension point.