Skip to content

include('createdAt') works on Parse.com not AWS parse server #2262

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

Closed
TheMikeCannell opened this issue Jul 12, 2016 · 1 comment · Fixed by #2263
Closed

include('createdAt') works on Parse.com not AWS parse server #2262

TheMikeCannell opened this issue Jul 12, 2016 · 1 comment · Fixed by #2263
Milestone

Comments

@TheMikeCannell
Copy link

TheMikeCannell commented Jul 12, 2016

I'm trying to migrate from parse.com to AWS and it's been weeks of troubleshooting. I finally figured out that the find() was failing because of this line in my cloud code

myQuery.include('createdAt');

However, I must have the createdAt dates for my returned objects. Is there different syntax I can use in order to get the createdAt data? I am also using myQuery.descending('updatedAt'); which works.

Steps to reproduce

Please include a detailed list of steps that reproduce the issue. Include curl commands when applicable.

  1. Create simple query in cloud code
  2. include the createdAt field

Expected Results

I have to comment out the line to get the query to work. I need to return this line so that I can use it in my iOS app.

Actual Outcome

App crashes when my code accesses the .createdAt variable because it isn't returned

Environment Setup

  • Server
    • parse-server version: latest
    • Localhost or remote server? (AWS, Heroku, Azure, Digital Ocean, etc): AWS
  • Database
    • MongoDB version: latest
    • Localhost or remote server? (AWS, mLab, ObjectRocket, Digital Ocean, etc): mLab

Logs/Trace

The error is in the iOS app. No errors in the parse dashboard log

@flovilmart
Copy link
Contributor

You don't need to include that key, createdAt should always be set as it's set by the server.
include is meant for including pointers, maybe there is a bug there as createdAt is not a pointer.

Can you provide the logs running with VERBOSE=1

@flovilmart flovilmart reopened this Jul 12, 2016
flovilmart added a commit that referenced this issue Jul 12, 2016
- Matches the behaviour on parse.com
- fixes #2262
@flovilmart flovilmart modified the milestone: 2.2.17 Jul 12, 2016
flovilmart added a commit that referenced this issue Jul 13, 2016
- Matches the behaviour on parse.com
- fixes #2262
rsouzas pushed a commit to back4app/parse-server that referenced this issue Mar 15, 2017
rsouzas pushed a commit to back4app/parse-server that referenced this issue Mar 16, 2017
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

Successfully merging a pull request may close this issue.

2 participants