Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-4980

Atomic push incorrectly determines whether there is a conflict

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.2.0.rc1
    • Component/s: Persistence
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible

      Description

      Atomic push conflict detection uses a regular expression match:

      -          (push_fields.keys.count { |item| item =~ /#{name}/ } > 1)
      

      This comparison permits a subset of the field name to match the field name. Comparisons should be for the entire field name.

      Note that field name is already determined to not contain any dots hence a "single component" comparison should be suitable.

        Attachments

          Activity

            People

            Assignee:
            oleg.pudeyev Oleg Pudeyev
            Reporter:
            oleg.pudeyev Oleg Pudeyev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: