Last active
August 29, 2015 14:03
-
-
Save sjcotto/0289a606d1c9947bf878 to your computer and use it in GitHub Desktop.
Api model relation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var test() { | |
var mc = model.open("modelId"); | |
var entityId = "54afd345jn243a453"; | |
var relation = mc.getRelation("persons").findBySource(entityId); | |
relation.add(someEntity); | |
relation.removeAll(); | |
relation.removeById(idOfRelation); | |
var params = { | |
name : "Hola" | |
} | |
relation.find(params); | |
//busca en esa relacion todos los destinos que tengan ese parametros asociado | |
//y retorna una lista | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment