Skip to content
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

Variables are being binded in the wrong order #209

Open
rosacris opened this issue Nov 21, 2017 · 1 comment
Open

Variables are being binded in the wrong order #209

rosacris opened this issue Nov 21, 2017 · 1 comment

Comments

@rosacris
Copy link

Hi,

I am struggling with a query whose parameters are being bind in the wrong order and I suspect it is a bug in Mariaex.

The query in question is:
Prediction |> join(:inner, [p], m in Market, m.'UUID' == ^e.market_id and p.'IDMarket' == m.'IDMarket') |> Repo.update_all(set: [IDActivated: true])

and the resulting SQL statement is
UPDATE tabPrediction AS t0 INNER JOIN tabMarket AS t1 ON (t1.UUID = ?) AND (t0.IDMarket = t1.IDMarket) SET t0.IDActivated = ? [true, "a5372405-173e-4b71-90e4-3c8a8e684134"]

Notice how true and the UUID are swapped.
Is this a bug or is it just me that I am not using ecto properly?

Thanks

@josevalim
Copy link
Contributor

What is your Ecto version? It is most likely this is an Ecto bug, so you should try to update to the latest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants