-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
Hi Aaron,
Wanted to let you know that my save() operations weren't working for my custom objects, and I figured out it was an issue with the update() CRUD call missing the classname and ID - below is the diff I used to get it to work.
Cheers,
Dave
@@ -57,8 +57,18 @@ function Sync( method, model, opts) {
break;
case "update":
Ti.API.info(' updating object with id ' + model.id);
-
var params = model.toJSON(), id_name = object_name.replace(/s+$/, "") + "_id"; -
var params = {}; -
// if custom object then set the classname in params variable -
if (model.config.settings.object_method === "Objects") { -
params['classname'] = object_name; -
} -
params['fields'] = model.toJSON(); -
params['id'] = model.id; -
id_name = object_name.replace(/s+$/, "") + "_id"; object_method.update(params, function(e) { if (e.success) { model.meta = e.meta;
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels