Description
Identifies any conflict between CFC instances on the client and the server.
Identifies any conflict between CFC instances on the client and the server.
objectEquals( Param1 ,Param2)
Conflict management in Developing ColdFusion Applications.
Parameter |
Description |
---|---|
param 1 |
New instance of the CFC on the client. |
param 2 |
Original instance of the CFC. |
<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>