mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
Can't set lenghts property for indexes in XML orm mapping #7530
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 @tomasvts on GitHub (Jul 4, 2025).
Bug Report
Summary
MariaDB default lenght for an index is 768, and dbal gets confused when it sees that length in the diff.
It is very much related with this PR:
https://github.com/doctrine/dbal/pull/3458
So if I try to set the default lenght for the index like this:
It fails with the following error:
because the Index method
hasTheSameColumnLenghtsexpects an array in that option:but how can I achieve this?
Current behavior
Expected behavior
The lenghts option is set for the index.
@morozov commented on GitHub (Jul 4, 2025):
@tomasvts if you believe this is a DBAL issue, please try reproducing it using only the DBAL.
@tomasvts commented on GitHub (Jul 8, 2025):
This issue is fixed by adding the lenghts property. See https://github.com/doctrine/dbal/pull/3458#issuecomment-569087641
but it can only be added as Annotation, and not as a XML property.
@derrabus commented on GitHub (Jul 15, 2025):
Moved to ORM. This was clearly posted on the wrong issue tracker.