You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Annette Liskey edited this page Aug 19, 2019
·
4 revisions
Retrieve all the instances from the passed-in entity name using an optional ID argument. Retrieve all instances if there is no ID specified. The ID argument can be a single ID, a list of IDs or an array of IDs. If the ID is not found or returns null, the array position will have an empty string in it in the specified order
###Returns
This function returns array of entities found
###Arguments
Key
Type
Required
Default
Description
entityName
string
Yes
---
id
any
No
---
sortOrder
string
false
---
The sort ordering of the array
###Examples
// Get all user entitiesusers=ORMService.getAll(entityName="User");// Get all user entities sorted by email descendingusers=ORMService.getAll(entityName="User",sortOrder="email desc");// Get all the following users by id'susers=ORMService.getAll("User","1,2,3");// Get all the following users by id's as arrayusers=ORMService.getAll("User",[1,2,3,4,5]);