Whatever message this page gives is out now! Go check it out!
EntityLoad(entityName,[id="",unique="",options=""]) EntityLoad(entityName,[id="",Order="",options=""]) EntityLoad(entityName,[Filter="",unique="",options=""]) EntityLoad(entityName,[Filter="",Order="",options=""]) |
Parameter | Description |
entityName | Name of the entity to be loaded. |
id | The primary key value of the entity that must be loaded. If the entity has a composite key, then the id has to be specified as key-value pairs (ColdFusion struct). |
unique | 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. |
filter | Key-value pair (ColdFusion 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 . |
order | String used to specify the sortorder of the entities that are returned. If specified, loads and returns an array of entities that satisfy the filtercriteria sorted as specified by the sortorder . |
options | A struct with the following keys:
|
EntityLoad('employee', {department='qa'} , {offset=21, maxResults=10}) |
<cfset employees = EntityLoad('employee')> |
Entity name, composite key. <cfset orderDetail = EntityLoad('orderdetails', {OrderID=100, ProductID=1}, true)> |
{country="UK"}, "Department Asc, Age Desc")> |
<cfset employeesFromUK = EntityLoad('employee', {country="UK"}> |
<cfset employee = EntityLoad('employee', {firstname="Marcia", lastname="Em"}, "true")> |