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

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy