I was trying to use a search filter using the TypeOrmCrudService and a postgres database.
While successful I noticed that the filter was case sensitive. By going through the code, I noticed that the service uses LIKE or ILIKE depending on the database type.
But when debugging the constructor, I noticed that this.repo.metadata.connection.options.type isn't available, so my queries use LIKE instead of ILIKE
The current workaround is to set this.dbName = "postgres" manually in the constructor.
My hypothesis is that the this.repo.metadata.connection.options.type field was removed in recent versions of TypeORM but I haven't had the time to check.
I was trying to use a search filter using the
TypeOrmCrudService
and a postgres database.While successful I noticed that the filter was case sensitive. By going through the code, I noticed that the service uses
LIKE
orILIKE
depending on the database type.But when debugging the constructor, I noticed that
this.repo.metadata.connection.options.type
isn't available, so my queries useLIKE
instead ofILIKE
The current workaround is to set
this.dbName = "postgres"
manually in the constructor.My hypothesis is that the
this.repo.metadata.connection.options.type
field was removed in recent versions of TypeORM but I haven't had the time to check.