Description

Deletes the record from the database for the specified entity. Depending on the cascade attribute specified in the mapping, it deletes the associated objects also.

Category

ORM functions

Function Syntax

EntityDelete(entity)

See Also

EntityLoadEntitySave

History

ColdFusion 9: Added this function.

Parameters

Parameter

Description

entity

Name of the entity being deleted.

Example

<cfset employee = EntityLoad('employee', 100, true)>
<cfset EntityDelete(employee)>
<cfset employee = CreateObject('component', 'employee')>
<cfset employee.setEmployeeID(100)>
<cfset EntityDelete(employee)>

 

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