Skip to content

Keep $elemMatch behavior consistent with MongoDB #131

Open

Description

@apkar

Document Layer allows $elemMatch to work against nonarray fields, whereas MongoDB allows only on array fields. Array operators semantics are quite confusing already. Although allowing $elemMatch on nonarray fields allows a few extra cases, it's leading to confusing semantics. Also, its possible to represent those extra queries with cleared, arguably longer queries.

This issue is to change the behavior back to supporting the operator only for array fields.

Although this is a backward incompatible change, I think we should go for it as this is a bit consistent for different queries especially when we use it together with None.

Activity

  1. self-assigned this
    on Apr 1, 2019
  2. added this to the 1.7.0 milestone on Apr 1, 2019
  3. modified the milestones: 1.7.0, 1.7.1 on Apr 16, 2019
  4. modified the milestones: 1.7.1, 1.7.3 on May 1, 2019
  5. removed their assignment
    on Sep 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions