Last updated on
Apr 27, 2021 06:03:19 AM GMT
|
Also Applies to ColdFusion
Description
Identifies any conflict between CFC instances on the client and the server.
Returns
Category
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>