Skip to content
Jorge Reyes edited this page May 29, 2015 · 3 revisions

Find all entities according to criteria structure. Ex: findAllWhere(entityName="Category", {category="Training"}), findAllWhere(entityName="Users", {age=40,retired=true});

###Returns

  • This function returns array

###Arguments

Key Type Required Default Description
entityName string Yes ---
criteria struct Yes --- A structure of criteria to filter on
sortOrder string false --- The sort ordering

###Examples

posts = ormService.findAllWhere(entityName="Post", criteria={author="Luis Majano"});
users = ormService.findAllWhere(entityName="User", criteria={isActive=true});
artists = ormService.findAllWhere(entityName="Artist", criteria={isActive=true, artist="Monet"});
Clone this wiki locally