Loads and returns an array of objects that match the sampleEntity
.
entityLoadByExample(sampleEntity [, unique, matchCriteria])
→ returns any
Filter
, then you can specify unique=true
to return a single entity instead of an array. If you set unique=true
and multiple records are returned, then an exception occurs.
<cfset employee= createObject("component", "employee")>
<cfset employee.setDepartment("ColdFusion")>
<cfset employee.setCountry("USA")>
<cfset employee=entityLoadByExample(employee)>
Signup for cfbreak
to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.