entityLoadByExample

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

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

Argument Reference

sampleEntity string
Required

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

Examples
Sample code invoking the entityLoadByExample function

<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.

Fork me on GitHub