You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using select() with a nested key on a pointer, e.g. select("pointerKey.nestedKey")
and the fetched object doesn't have a pointer set, getting the pointer will result in and empty object rather than undefined.
I am experiencing this issue on Heroku, but am not able the reproduce it locally, using the same parse-server and node versions.
varquery=newParse.Query("MyClass");query.doesNotExist("pointerKey");query.include("pointerKey");query.select("pointerKey.nestedKey");// This line causes the issuequery.first({success: function(myObject){varpointerObject=myObject.get("pointerKey");console.log(pointerObject);// [object Object]console.log(JSON.stringify(pointerObject));// "{}"// pointerObject should be undefined but is an empty Object}});
Expected Results
A pointer that has not been set should return undefined when using get().
Actual Outcome
An empty object is returned when using get().
Environment Setup
Server
parse-server version: 2.5.3
Operating System: Ubuntu 14.04
Hardware: Heroku hobby dyno
Localhost or remote server? Remote, Heroku
Database
MongoDB version: 3.0.11
Storage engine: MMAPv1
Hardware: Shared cluster (AWS 1GB RAM)
Localhost or remote server? Remote, mLab
The text was updated successfully, but these errors were encountered:
pgiguere1
changed the title
select() with nested keys result in empty object when a pointer doesn't existselect() with a nested key results in an empty object when a pointer doesn't exist
Aug 4, 2017
Issue Description
When using
select()
with a nested key on a pointer, e.g.select("pointerKey.nestedKey")
and the fetched object doesn't have a pointer set, getting the pointer will result in and empty object rather than
undefined
.I am experiencing this issue on Heroku, but am not able the reproduce it locally, using the same parse-server and node versions.
Steps to reproduce
Expected Results
A pointer that has not been set should return
undefined
when usingget()
.Actual Outcome
An empty object is returned when using
get()
.Environment Setup
Server
Database
The text was updated successfully, but these errors were encountered: