parse-server icon indicating copy to clipboard operation
parse-server copied to clipboard

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

Open AnAppDev01 opened this issue 10 years ago • 1 comments

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

AnAppDev01 avatar Jul 12 '16 20:07 AnAppDev01

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 avatar Jul 12 '16 21:07 flovilmart