I disagree that the = operator should suddenly morph into "is null or equals". The problem is fundamentally the meaning of null and equality, and their relation.
Consider a query like session.createQuery( "from Person p where p.nickName = :someNickName" ).setString( "someNickName", null ).list(); what should happen here? In terms of consistency with what is being proposed here, this should match any Person records with a NULL nick name. But that's not what happens today. And what about an IN predicate? Other predicates?
What is being described here (to me) is a "matches" operator, like we support with the Criteria API example queries, E.g. session.createQuery( "from Person p where p.name matches :someExample" )... which morphs into "... where ( p.first_name is null or p.first_name = ? ) and ( p.last_name is null or p.last_name = ? ) ..."
|