-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Postgres $any with an array gets a sytax error #4064
Comments
Hmm, from the unit tests, it looks like we should be generating with brackets. Have you tried latest master sequelize/test/unit/sql/where.test.js Line 394 in bebad6e
|
+1 I am getting this in 3.3.2
Removing ::VARCHAR allows this query to work also. |
@mickhansen @janmeier I updated to the bleeding edge. same bug in master. |
Reproducable.
|
I'm still running into the same issue as of version 3.20.0, installed from npm. While @janmeier - is correct for $any tests, the tests targeting the issue here, combination of $ilike, $any and array, (https://github.com/sequelize/sequelize/blob/master/test/unit/sql/where.test.js#L569) expects the array statement without the parentheses, generating an sql statement which throws an error when run against the database. |
I managed to make it work by including a sequelize literar after the iLike.
|
If I construct a WHERE clause with $any and an array, I get an error.
generates this SQL:
and this error:
From Postgres syntax, it seems like ANY should have brackets, like this:
The text was updated successfully, but these errors were encountered: