Description
Related issues and comments: #14583 #23853 #23808
Description
The ORMQueryBuilderLoader
tries to guess the identifier type to perform filter out invalid values for integral or UUID types by matching a hardcoded list of Doctrine type names. However there are cases that guessing is not working properly and it causes invalid queries to be constructed.
In my case I have separate UUID types for each entity, such that I have strong typing in PHP for these IDs. Lets say BlogId
(doctrine name blog_id
) and PostId
(doctrine name post_id
).
When using an EntityType, internally constructing a ORMQueryBuilderLoader, it fails to filter out empty strings. This creates a query Postgres chokes on with error: ERROR: invalid input syntax for uuid
.
It would be nice if there was an extension point such that this guessing logic can be altered for custom types.
Example
Maybe we could creating a factory service which can be decorated for the ORMQueryBuilderLoader
? Such that a custom implementation can be provided?