Skip to content

Querying by field with ObjectId value does not work #9

Description

@irnc

Assuming that in blogs collection every document have authorId field with ObjectId value, following query from Queries README does not work because userId argument is a String and it is not converted to ObjectId.

store.query.expose('blogs', 'authoredBy', function (userId) {
  return this.where('authorId').equals(userId);
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions