mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
Use a single associative entity related to different entities #6670
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 @ZaneCEO on GitHub (Apr 1, 2021).
This issue relates to my question "Doctrine in Symfony: use a single “Author” associative entity related to different entities" on StackOverflow.
In a nutshell: at the moment it looks like it's not possible to handle a single associative entity relating to two or more unrelated entities (depending on a third field).
I think it's unlikely that this cannot be done with Doctrine at the moment (it's a very common database design). What is more likely to me is that the feature isn't documented (or, at least, I cannot find it).
@ZaneCEO commented on GitHub (Apr 1, 2021):
Single table inheritance is what I was looking for.