include('createdAt') works on Parse.com not AWS parse server
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.
- Create simple query in cloud code
- 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
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