8000 Variables are being binded in the wrong order · Issue #209 · xerions/mariaex · GitHub
[go: up one dir, main page]

Skip to content
8000

Variables are being binded in the wrong order #209

Open

Description

@rosacris

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

Activity

  1. josevalim commented on Feb 17, 2018

    @josevalim
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0