Description

Identifies any conflict between CFC instances on the client and the server.

Returns

Category

Other functions

Function Syntax

objectEquals( Param1 ,Param2)

See Also

Conflict management in Developing ColdFusion Applications.

Parameters

Parameter

Description

param 1

New instance of the CFC on the client.

param 2

Original instance of the CFC.

Example

<cfset isNotConflict = ObjectEquals(originalobject, serverobject)> 
<cfif isNotConflict> 
<cfif operation eq "UPDATE"> 
<cfset obj = ORMGetSession().merge(clientobject)> 
<cfset EntitySave(obj)> 
<cfelseif operation eq "DELETE"> 
<cfset obj = ORMGetSession().merge(originalobject)> 
<cfset EntityDelete(obj)> 
</cfif> 
<cfelse><!----Conflict---> 
<cflog text = "is a conflict"> 
<cfset conflict = CreateObject("component","CFIDE.AIR.conflict")> 
<cfset conflict.serverobject = serverobject> 
<cfset conflict.clientobject = clientobject> 
<cfset conflict.originalobject = originalobject> 
<cfset conflict.operation = operation> 
<cfset conflicts[conflictcount++] = conflict> 
<cfcontinue>

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