Design: Define null semantics

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • 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:

      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-74 based on the decision

            Assignee:
            Slav Babanin
            Reporter:
            Slav Babanin
            None
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: