Description
When using SQLite with symfony/uid and symfony/doctrine-bridge, the column type of an uuid is BLOB (see https://github.com/symfony/symfony/blob/9ad4353a8cf349c3b431c163af0b1dd9a29c33a2/src/Symfony/Bridge/Doctrine/Types/AbstractUidType.php#L28).
Furthermore, the Sylius\Bundle\GridBundle\Doctrine\ORM\ExpressionBuilder used in the EntityFilter does not specify the type of the parameter, thus the inferred type is a string.
It implies that when filtering the query we'll compare the string representation of the uuid with its binary representation.
Therefore the EntityFilter does not work.
How to reproduce
- use SQLite as the dababase
- use the
Symfony\Component\Uid\Uuid type for the identifier for the entities
- have a relation between two entities: let's say
Foo and Bar
- use the
EntityFilter on the grid of one the entities, for instance filter Foo by Bar
Possible solutions
Define the type of the parameter.
Description
When using SQLite with
symfony/uidandsymfony/doctrine-bridge, the column type of anuuidisBLOB(see https://github.com/symfony/symfony/blob/9ad4353a8cf349c3b431c163af0b1dd9a29c33a2/src/Symfony/Bridge/Doctrine/Types/AbstractUidType.php#L28).Furthermore, the
Sylius\Bundle\GridBundle\Doctrine\ORM\ExpressionBuilderused in theEntityFilterdoes not specify the type of the parameter, thus the inferred type is a string.It implies that when filtering the query we'll compare the string representation of the uuid with its binary representation.
Therefore the EntityFilter does not work.
How to reproduce
Symfony\Component\Uid\Uuidtype for the identifier for the entitiesFooandBarEntityFilteron the grid of one the entities, for instance filterFoobyBarPossible solutions
Define the type of the parameter.