EntityLoad()
Loads and returns an array of entities of the specified entityname.
EntityLoad (entityname, filtercriteria [,unique]
EntityLoad(entityname, filtercriteria, sortorder [, options])
EntityLoad( name=string, idOrFilter=any, uniqueOrOrder=any, options=any );
Returns: any
| Argument | Description |
|---|---|
|
name
string,
required
|
edit
Name of the entity to be loaded. |
|
idOrFilter
any,
optional
|
edit
The primary key value of the entity that must be loaded or Key-value pair (Struct) of property names and values. If there are more than one key-value pair, then the AND operator is used.If specified, loads and returns an array of entities of the specified entity name that matches the filtercriteria. Alias: id, filter |
|
uniqueOrOrder
any,
optional
|
edit
when the second argument is an id then this argument defines the boolean "unique" otherwise it defines the order.
Alias: unique, order |
|
options
any,
optional
|
edit
The following options to customize the output (only used when second argument is "id"):
|
Examples
edit entityload("sample_entityname");
See also
- Cache
- ORM
- Search Issue Tracker open_in_new
- Search Lucee Test Cases open_in_new (good for further, detailed examples)