mirror of
https://github.com/doctrine/orm.git
synced 2026-04-29 17:33:15 +02:00
Case sensitive query #6475
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @VincentLanglet on GitHub (May 26, 2020).
Support Question
When writing
$expr->like($x, $y)or$expr->eq($x, $y),I'll get a query
x LIKE yorx = y.The behaviour of this query is different with the database
If I want to be sure, without knowing the database, to be case-insensitive, I can write
But what if I want to be case sensitive and I don't know in which database the query will be made ?
How can I do ? Does a doctrine feature exists ? Or would it be possible to create one ?
@beberlei commented on GitHub (May 27, 2020):
MySQL makes a query based on the charset of the column, so the creator of the schema is in full control of the behavior by creating the required schema. This can be achieved using Doctrine DBAL Schema access points, or when creating the schema through other tools.