Skip to content

Unable to save array of pointers in cloud code #434

@nirvana74v

Description

@nirvana74v

var planobjar = []; for(var item of plansel) { var planob = {"objectId": item.planid, "__type": "Pointer", "className": "Plans"}; var pobj = {"planid": planob, "qty": item.qty, "unit":item.unit}; planobjar.push(planob); } var nClass = Parse.Object.extend("myClass"); var robj = new nClass(); robj.set ( 'planSelection', planobjar); robj.save({ success: function(planres) { // code }, error:function(error) { // code } });

If I try to save this array into an array field it doesn't save, but if it's an array without pointer it saves properly

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions