Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-103

Update queries cannot contain $ or '.' in field name

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.4
    • Affects Version/s: 1.4
    • Component/s: None

      When updating a record in 1.4 you are no longer able to use special fields (e.g. $elemMatch) or a '.' in the field name definition.

      For example

      collection.update({_id: <id>, {item: {$elemMatch: {name: 'my_name'}}}}, ...)
      will fail with "key $elemMatch must not start with '$'"

      and

      collection.update(

      {'item.name': 'my_name'}

      , ...)
      will fail with "key item.name must not contain '.'"

            Assignee:
            christkv Christian Amor Kvalheim
            Reporter:
            Tivs Jonathan Rainey [X]
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: