-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Enum IDs and search by Enum fields #9629
Conversation
This is becoming a larger rabbit hole than anticipated to support enum ids. I am unsure about proceeding with thiS as I currently have little tile to spare for review due to private life. |
@beberlei lol, tell me about it. its 2am here and what started as a simple fix turned out to 6 hour nightmare. I see some issues still, for some reason |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to fuether review: UoW additions potentially break second level cache
Aha! Thanks, I have pushed new commit which fixes the issue thanks to your guidance |
@beberlei I have removed some of the more controversial changes which were causing issues with tryGetById(). That method is now unchanged. The latest commit passes all tests. There is no BC break. Please run workflows and review. Thanks! |
tests/Doctrine/Tests/ORM/Utility/IdentifierFlattenerEnumIdTest.php
Outdated
Show resolved
Hide resolved
All tests passing now, can we have a merge please? |
Thank you @michnovka! |
* 2.12.x: Leverage generic persistence event classes (doctrine#9633) Fix static analysis for Persistence 2.5 (doctrine#9648) Improve exception message (doctrine#9646) Deprecate console helper (doctrine#9641) Use charset/collation from column or table default when creating relations (doctrine#9636) Support Enum IDs and search by Enum fields (doctrine#9629) Fix composer install in contributing readme
This is a 2.12.x branch PR from #9628 and #9624
It implements:
Repository->find(SomeEnum::XXX->value)
andRepository->find(SomeEnum::XXX)
syntaxUnitOfWork::tryGetById()
now supports Enum IDs as well as ID flattening when foreign identifiers are used (before this had to be handled by the caller, but it was on some and was not on other places)