mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
Lookup/Enum table annotation #6022
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 @xxRockOnxx on GitHub (Jul 21, 2018).
Originally assigned to: @Ocramius on GitHub.
Feature Request
Summary
There are times where fetching is really unnecessary. Good example are "Enum tables" or "Lookup table"
Imagine this flow:
Request -> Controller -> Service -> Repo
In your request you might have something like
Where would it fit?
ContactTypeRepo::find()especially when you have deep object.Wouldn't it be a lot easier if we have an entity annotation that look like
You can then set it either the id or the entity itself (without coming from entityManager. Just:
then EntityManager will automatically get the reference for it? Because right now if you do that, the error would be
Workaround
Thoughts?