Saves or updates data of the entity and all related entities to the database. ColdFusion automatically tries to find if a new record should be inserted or an existing record be updated for the given entity. If you set forceinsert=true, then ColdFusion tries to insert the entity as a new record.
Void
EntitySave(entity, [forceinsert]) |
EntityLoad, EntityLoadByExample, EntityDelete
ColdFusion 9: Added this function.
Parameter |
Description |
|---|---|
entity |
Name of the entity that must be saved in the database. |
forceinsert |
If true, then ColdFusion always tries to insert the entity as a new record. |
To save an entity:
<cfset employee = createObject("Employee")> |
To update an entity:
<cfset employee = EntityLoad('employee', 100, true)>
|
Sign in to your account