Closed jlee0831 closed 6 years ago
Hm. In Ecto's DSL it isn't pointless it seems. Perhaps we can try and detect if we're in this DSL somehow.
It seems there is an alternative syntax, although most examples I've seen use the original syntax above. Anyhow, this seems like it is a reasonable workaround for my situation:
def not_foo?(query \\ SomeModel) do
from r in query,
where: not(r.foo)
end
I created a function on an Ecto model as follows:
This caused dogma to fail with:
ComparisonToBoolean: Comparison to a boolean is pointless
. This seems to be incorrect, although perhaps theres another way of writing that query that I don't understand yet.