mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
Custom type id settings not applied in ManyToOne #6556
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 @garak on GitHub (Oct 16, 2020).
I'm using a custom type as id (in my case, it's a ShortidType)
Such type accept a
lengthoption in its defintion.If I pass such option, my field is generated accordingly. Unfortunately, the same doesn't apply to a ManyToOne definition, where option is ignored.
The following example is about defining a Game entity with many Player entities associated:
When I build the schema for such mapping, the
idfields for both Game and Player are correctly generated with alengthof 9.Instead, the
game_idfield generated in theplayertable is generated with the defaultlengthof 7.