Explicitly forbid StatelessSession.upsert if we don't implement it properly

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Critical - P2
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Currently, StatelessSession.upsert does not result in FeatureNotSupportedException/SQLFeatureNotSupportedException, instead it behaves incorrectly:

      1. It seem to result in executing two operations one after the other: at first update, then insert.
      2. update has field values associated with wrong field names, which also means that the _id filter for the update operation has wrong value.
      3. When upserting a document with a non-existing _id, it is successfully inserted. However, the aforementioned update behavior may accidentally corrupt an unrelated document it if happens to have _id equal to whatever value gets used in the update filter.
      4. When upserting a document with a pre-existing _id, upsertion fails because insert fails. Though the reported error is misleading for the reasons reported in HIBERNATE-95.

              Assignee:
              Unassigned
              Reporter:
              Valentin Kavalenka
              None
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: