There isn’t only the not equal operator that is affected. All binary operators are ANDed when applied on composite types. For example, we have now:
turns into:
where FOO < ? AND BAR < ?
which is obviously wrong.
While fixing the not equal operator is easy, the others are another issue. Since JPA 2.1 only requires equality and not equality on entities (see section 4.6.7), I suggest we just throw an exception. What do you think?
|