mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
Load other entities by class name and id fields in Entity on Doctrine #5094
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 @aistis- on GitHub (Apr 12, 2016).
Originally assigned to: @Ocramius on GitHub.
I am looking an approach for following case. I do have an entity which keeps information about other entity which could be any type of entuty. The subentity is recognized by field combination
subject_classandsubject_id. Is there a way that Doctrine would automatically fetch this subentity whenever I am fetching the parent?Parent entity example:
@Ocramius commented on GitHub (Apr 12, 2016):
This kind of problem/solution is documented at http://doctrine-orm.readthedocs.org/projects/doctrine-orm/en/latest/cookbook/strategy-cookbook-introduction.html