EntityLoadByExample()
Loads and returns an array of objects that match the sample entity.
entityLoadByExample(sampleEntity,[unique])
EntityLoadByExample( sampleEntity=object, unique=boolean );
Returns: any
| Argument | Description |
|---|---|
|
sampleEntity
object,
required
|
edit
Name of the sample entity that is used to match and filter similar entities to load. |
|
unique
boolean,
optional
|
edit
If unique is set to true, then the entity is returned. If you are sure that only one record exists that matches this filtercriteria, then you can specify unique=true, so that a single entity is returned instead of an array. If you set unique=true and multiple records are returned, then an exception occurs. |
Examples
edit EntityLoadByExample(obj,true);
See also
- ORM
- Search Issue Tracker open_in_new
- Search Lucee Test Cases open_in_new (good for further, detailed examples)