Skip to content

Instantly share code, notes, and snippets.

@dbaba
Last active December 9, 2015 22:08
Show Gist options
  • Save dbaba/4334894 to your computer and use it in GitHub Desktop.
Save dbaba/4334894 to your computer and use it in GitHub Desktop.
ModelMapper.remove() for Singleton Models from MOAT js API Document
// Prepares an update operation.
var mySingletonTypeMapper =
session.newModelMapperStub('MySingletonType');
// Enqueues the remove operation
mySingletonTypeMapper.remove({
error : function(type, code) { // ---- (2)
if (type == 'NOT_FOUND') {
...
}
}
});
// Commits all preset requests
session.commit(); // ---- (1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment