User Guide Cancel

EntityToQuery

 

Description

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

Returns

Query

Category

ORM functions

Function Syntax

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

Parameter

Parameter

Description

orm_object

Entity object that needs to be converted to a query object.

orm_object_array

Array that needs to be converted to a query object.

entity_name

Name of the entity. Use this optional parameter to return the query of the given entity in the case of inheritance mapping.

See Also

EntityLoadEntityDelete

History

ColdFusion 9: Added this function.

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

Get help faster and easier

New user?