`GenericConstraint<T> or()` might have unexpected behavior for chained constraints
BaptBeuns opened this issue · 1 comments
BaptBeuns commented
When writing something like:
constraint1.or(constraint2, constraint3)
The generated SQL statement is the following:
WHERE (constraint1 OR (constraint2) AND (constraint3))
I think we should expect this to be the following:
WHERE (constraint1 OR ((constraint2) AND (constraint3)))
Let me know if I'm doing things wrong. I'll submit a PR for that in the next minutes.
BaptBeuns commented
This is not accurate, the precedence of AND on OR makes the parentheses useless.