Skip to content

Pointer disappears in query results in CloudCode #3913

Closed
@mtrezza

Description

@mtrezza

Issue Description

When using a particular combination in a CloudCode query of include, greaterThan, lessThan, doesNotMatchKeyInQuery the included field goes missing in the query result objects.

Steps to reproduce

Create query and execute:

var query = new Parse.Query(UserProfileClass);
query.include("user"); // This is a poiner to a `_User` class object.
query.greaterThan("updatedAt", date1);
query.lessThan("updatedAt", date2);
query.doesNotMatchKeyInQuery("user", "user", anotherQuery); // AnotherQuery returns objects with a field `user` that is a pointer to a `_User` class object.
query.find();

Expected Results

The query results should contain the "user" field with its fields because of the include parameter.

Actual Outcome

The query results do not contain the "user" field.
However, when any of the query parameters is commented out, e.g. doesNotMatchKeyInQuery or greaterThan, then the "user" field is properly included.

Environment Setup

  • Server

    • parse-server version: 2.4.1
  • Database

    • MongoDB version: 3.2.11

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions