Loads and returns an array of objects that match the sampleEntity.

entityLoadByExample(sampleEntity [, unique, matchCriteria]) → returns any

Argument Reference

sampleEntity string

No Help Available

unique boolean

When true a single entity is returned, otherwise an array is returned.
If you are sure only one record exists for the 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.

matchCriteria any

No Help Available

Sample code invoking the entityLoadByExample function

<cfset employee= createObject("component", "employee")>
<cfset employee.setDepartment("ColdFusion")>
<cfset employee.setCountry("USA")>
<cfset employee=entityLoadByExample(employee)>

Fork me on GitHub