mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
Schema validator doesn't report invalid indexBy configuration.
#7421
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 @janklan on GitHub (Sep 23, 2024).
Bug Report
Reproducer
https://github.com/janklan/doctrine-bug-11608. Follow the instructions in README.md to see the bug in action.
A detail of what's happening
Plan::$subscriptioncollection uses customindexByto allow fetching aSubscriptionusing a Customer ID when known.indexByis deceiving because it matches the name of the property but not the name of the DB columnindexBywasn't used.Consequence
What's wrong
bin/console doctrine:schema:validateto pick up on this misconfigurationRelated issues
I reckon this one is quite relevant https://github.com/doctrine/orm/issues/4203