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
Warn on missing :on in joins #4074
Warn on missing :on in joins #4074
Conversation
lib/ecto/query/builder/join.ex
Outdated
Logger.warning( | ||
"#{join[:file]}:#{join[:line]} Missing `:on` in join#{maybe_source}, defaulting to `on: true`." | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think documenting that it defaults to Also not sure I understand why |
Got it, will add it 👍
This was to avoid having a wall of warnings when running tests, but I can revert test files if you prefer? |
Ah I thought the tests were run on |
Thank you! |
Add a warning when
:on
is missing and defaults totrue
, as proposed here: