mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
PersistentCollection uses Ulid Rfc4122 as indexBy value instead of uid one #7062
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 @ndousson on GitHub (Oct 18, 2022).
Bug Report
Summary
During our developments, we encounter a problem with the key index value of PersistentCollection when using a Ulid typed property.
When we executes a find(), Doctrine hydrates correctly the Ulid value of the object in the Collection but use the Rfc4122 Ulid value format as the index.
We expect the same value at the one in the entity.
I previously opened an issue on the Symfony repository => https://github.com/symfony/symfony/issues/47867
Thanks to @stof and @fancyweb for their feedback, the issue should be opened here.
Current behavior
How to reproduce
Example of code:
Expected behavior
As a "logic" behavior, we expect to have the uid value of the Ulid and not the Rfc4122 as the index key of the collection.
Additional Context
Output of debug() on repository find() result: