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

Saving Requested Object As New Object In Parse Server Cloud Code

Open sanergulec opened this issue 10 years ago • 1 comments

I am trying to save a new object in my cloud code as below, but get no results. Nothing is saved.

var cityObj = new Parse.Object('cities');
cityObj=req.object;
cityObj.save();

But rather than saving the whole object, if I try to save just one item of the object as below, the object with one item is created. Am I doing anything wrong in the code above?

var cityObj = new Parse.Object('cities');
cityObj.set('number', req.object.get('number'));
cityObj.save();

sanergulec avatar May 05 '16 12:05 sanergulec

Yes, the code is incorrect but this does not seem to be an issue with parse-server so would be better asked on stackoverflow: http://stackoverflow.com/questions/tagged/parse.com

steven-supersolid avatar May 05 '16 15:05 steven-supersolid