Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

include() in aggregate queries #4728

Closed
fmendoza opened this issue Apr 16, 2018 · 1 comment
Closed

include() in aggregate queries #4728

fmendoza opened this issue Apr 16, 2018 · 1 comment

Comments

@fmendoza
Copy link

I'm trying to show the pointer data but it seems is not supported?

let query = new Parse.Query('MyObject')
query.include(['myPointer'])

let pipeline = {
    match: { sectionType: 'Used', status: 'Active', deletedAt: { '$exists': false } },
    sample: { size: 10 }
}

let result = await query.aggregate(pipeline)

Expected Results

myPointer field should return all database fields

Actual Outcome

myPointer only return className, objectId and __type fields.

Environment Setup

  • Server

    • parse-server version: 2.7.4
    • Operating System: Mac
    • Hardware: Macbook Pro
    • Localhost or remote server?: Localhost
  • Database

    • MongoDB version: 3
    • Storage engine: n/a
    • Hardware: Macbook
    • Localhost or remote server? : Localhost

Logs/Trace

n/a

@dplewis
Copy link
Member

dplewis commented May 2, 2018

Its currently not supported. Since you are using aggregate you can use $lookup (left join) #1908 (comment)

Feel free to open a PR. I'm a bit surprised that mypointer returned data without using project stage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants