-
Notifications
You must be signed in to change notification settings - Fork 47
Issue with parameters in relation to in and a dynamic/1 collection #164
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
Comments
I'll look into this soon. |
Indeed @LostKobrakai this looks to be a bug. Working on a fix now. |
@LostKobrakai the "works" is different behavior than the postgres adapter because the
I'll need to figure something out here. |
Postgres uses the array as parameter because it's also doing |
Yea we can't use the This may require upstream changes in Ecto. I'm still trying to figure out a solution. As a work around, don't do this: val = dynamic(^["abc", "def"])
cond = dynamic([a], a.col in ^val) I am curious, why is that being used rather than just passing the list directly? |
This is for a query builder, where conditions come from a datastructure. The right hand side of |
I do not believe this can be supported. The list of array values without changing things upstream in ecto. All of the other SQL implementations can handle it just fine because So the work around for now is to not use dynamic in this way. |
Doesn't work:
Works:
Looks like there's some place flattening out the parameters, which doesn't catch the dynamic case
The text was updated successfully, but these errors were encountered: