entitytoQuery

Description

Converts the input entity object or the input array of entity objects to a query object.

Categories

Related

History

ColdFusion 9: Added this function.

Syntax

EntitytoQuery (orm_object, [entity_name]) 
EntitytoQuery (orm_object_array, [entity_name])

Returns

Query

Usage

The following conditions apply for this function:
In the case of array input, all objects in the array must be of the same type.
The result query will not contain any relation data.

Example

<cfset artists = EntityLoad("Artist")> 
<cfset artistQuery = EntityToQuery(artists)>