-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ilike #654
Ilike #654
Conversation
Ilike is platform-dependent, it should not be part of Doctrine itself. |
@@ -173,11 +173,21 @@ public function testLikeExpr() | |||
$this->assertEquals('a.description LIKE :description', (string) $this->_expr->like('a.description', ':description')); | |||
} | |||
|
|||
public function testLikeExpr() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You probably meant testILikeExpr, since this one is already declared.
According to the SQL standard LIKE is supposed to be case insensitive.. PostgreSQL makes it case sensitive so ORM should use ILIKE on PostgreSQL platform by default. However changing this would be a BC break. |
The same is a problem for Sqlite which is case sensitive by default afaik, in MySQL it depends on the collation. I don't think we can find a sufficient solution here that works on all platforms. I have to reject this PR, because its PostgreSQL specific and DQL is platform independent. You can "fix" this for you, by extending the PostgreSQLPlatform in DBAL and changing the LIKE Expression for Postrgres. |
Sorry to dig that up, but there is no |
What @beberlei meant here is probably defining a custom DQL string function. |
Thanks for clarifying that. |
Ilike (insensitive like) expression added for postgres support