Why does removing on: true
from a keyword query result in a warning?
missing
:on
in join, defaulting toon: true
.
The :on
option is documented as “defaults to true
”.
Env:
- ecto_sql 3.10.2
- elixir 1.15.4-otp-26
- erlang 26.0.2
Why does removing on: true
from a keyword query result in a warning?
missing
:on
in join, defaulting toon: true
.
The :on
option is documented as “defaults to true
”.
Env:
Well, you got me curious so I did some digging and found the PR that introduced the warning as well as the mailing list discussion discussing why. I agree that the docs could be improved to explain this a little better as it is a bit confusing.
Thanks for unearthing this! Glancing at Ecto source, this is probably the on:
clause that allows Ecto.assoc/3
to not need it explicitly.