-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Query
-
None
-
13
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Before implementing ternary logic handling for null comparisons (= null, != null), we need to define the intended semantic model - whether the MongoDB Hibernate integration should follow three-valued logic (3VL), as Hibernate 6.3 does, or two-valued logic (2VL), which may simplify behavior and better align with MongoDB’s handling of missing and null fields.
Context:
- Hibernate 6.3+ interprets null comparisons as returning null (per 3VL), treated as false in predicate contexts.
- MongoDB compares missing and null values equally, effectively operating as 2VL.
- Implementation work for null comparison behavior is tracked in
HIBERNATE-74. - Related tickets:
HIBERNATE-62- handling non-null fieldsHIBERNATE-71- handling is null and is not null predicates
Acceptance criteria:
- Evaluate pros and cons of adopting 3VL (consistency with Hibernate) vs. 2VL (consistency with MongoDB semantics)
- Document the chosen model and rationale.
- Provide implementation guidance for
HIBERNATE-74based on the decision
- is depended on by
-
HIBERNATE-71 'is Null' ('is not null') MQL translation
-
- Closed
-