Skip to content

Instantly share code, notes, and snippets.

@dbaba
Last active October 7, 2015 06:47
Show Gist options
  • Save dbaba/3122106 to your computer and use it in GitHub Desktop.
Save dbaba/3122106 to your computer and use it in GitHub Desktop.
ModelMapper.findByUid() from MOAT js API Document
// Gets a UID of an object to be fetched.
var uid = 'an-identifier-for-object';
var myArrayTypeMapper =
session.newModelMapperStub('MyArrayType');
myArrayTypeMapper.findByUid(uid, {
success : function(result) {
if (result.array) {
var entity = result.array[0];
// do something
....
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment