Open vlastv opened 2 years ago
?
DoctrineORMSubscriber builds the condition assuming that the primary key is always a integer. But it's not. When the primary key is a string, the filter specifies the type, just like a integer. The code that does this is listed at the beginning.
A quick solution, as for many other problems with the EntityFilterType
, could be to use the ChoiceFilterType
instead with a its choices
loaded by a Repository method of the Entity in question and maybe also a n additional "none" choice like I described in #293 . But I also see the problem with the fixed INTEGER-type in DoctrineORMSubscriber, that makes the EntityFilterType
incompatible with Uuid and other non-integer primary keys.
Error in https://github.com/lexik/LexikFormFilterBundle/blob/master/Event/Subscriber/DoctrineORMSubscriber.php#L111