Skip to content

Commit

Permalink
Add warning about unspecified join condition behaviour (#4276)
Browse files Browse the repository at this point in the history
  • Loading branch information
greg-rychlewski authored Sep 9, 2023
1 parent c53d13f commit 778de29
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/ecto/query.ex
Original file line number Diff line number Diff line change
Expand Up @@ -1279,6 +1279,16 @@ defmodule Ecto.Query do
after the join. In the expression syntax, the options are given as
the fifth argument.
> ### Unspecified join condition {: .warning}
>
> Leaving the `:on` option unspecified while performing a join
> that is not a cross join will trigger a warning. This is to
> help users avoid performing expensive cross joins when they don't
> mean to. If the behaviour is desired, you may remove the warning by
> changing to a cross join or explicitly setting `on: true`. If
> the behaviour is not desired, you should specify the appropriate
> join condition.
## Keywords examples
from c in Comment,
Expand Down

0 comments on commit 778de29

Please sign in to comment.