I've got an array of objects (which in turn each have an array of child objects - orders & order items). I need to loop over this array and update a status property on each order. No problem there. What I'm unsure of, and not able to test at the moment, is whether I can encapsulate this entire loop process in a cftransaction tag and have it roll back every database operation in every object if the process experiences an exception somewhere down the line. i.e. I want the process to be "all or nothing".
Yes, if you have the <cftransaction> tags around the whole loop:
<cftransaction>
<cfloop ... outer loop ...>
<cfloop ... inner loop ...>
... update DB ...
</cfloop>
</cfloop>
</cftransaction>(even if you process the loops by calling methods)
In summary I guess I'm asking whether cftransaction can span across multiple objects. Maybe this is an obvious question but I'm unsure of it's robustness.
Yes, in CFMX6.1 (but not in CFMX6.0).
Regards, Sean
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' in the message of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.com).
An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]
