-
-
Notifications
You must be signed in to change notification settings - Fork 19
list
Gunnar edited this page Dec 1, 2017
·
4 revisions
List all of the instances of the passed in entity class name. You can pass in several optional arguments like a struct of filtering criteria, a sortOrder string, offset, max, ignorecase, and timeout. Caching for the list is based on the useQueryCaching class property and the cachename property is based on the queryCacheRegion class property.
- This function returns array
Key | Type | Required | Default | Description |
---|---|---|---|---|
entityName | string | Yes | --- | |
criteria | struct | No | [runtime expression] | |
sortOrder | string | No | ||
offset | numeric | No | 0 | |
max | numeric | No | 0 | |
timeout | numeric | No | 0 | |
ignoreCase | boolean | No | false | |
asQuery | boolean | No | true |
users = ormService.list(entityName="User",max=20,offset=10,asQuery=false);
users = ormService.list(entityName="Art",timeout=10);
users = ormService.list("User",{isActive=false},"lastName, firstName");
users = ormService.list("Comment",{postID=rc.postID},"createdDate desc");