Summary
Support SQL / ternary null semantics as an alternative to the MQL null semantics that are the only option at GA.
Background
The GA release ships with MQL null semantics as the only supported mode, enforced via a required configuration property (com.mongodb.hibernate.semantics.nulls=MQL). MQL semantics differ from SQL in a key way: missing fields and explicit null values are treated identically, and null does not equal null.
Virtually every customer migrating from a relational database will expect SQL-style three-valued logic (NULL != NULL, IS NULL vs IS MISSING distinction). Without it, queries behave differently than developers expect, creating silent correctness bugs that are difficult to diagnose.
Expected Behaviour
When SQL / ternary null semantics are enabled:
- NULL = NULL evaluates to UNKNOWN (not TRUE)
- WHERE x = :param with a null param returns no rows (as per SQL)
- Explicit null and missing field are treated distinctly in predicates
Why This Matters
This is the single most likely source of correctness complaints post-GA from migration customers. It is the unlock for the "drop-in" migration messaging. It was deliberately deferred from GA — not deprioritised permanently.
- is blocked by
-
HIBERNATE-147 Design: Define null semantics
-
- Backlog
-