Skip to content

EntityFilter not working when using SQLite #361

Description

@brambaud

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions