Salvatore,

You can absolutely do this assuming those create functions do not
contain cftransaction tags themselves and also assuming that the create
functions contain database manipulation functions as well. HTH,

Phil

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Salvatore Fusto
Sent: Wednesday, April 26, 2006 6:23 AM
To: [email protected]
Subject: [CFCDev] <cftransaction>

Hi all,
suppose i've a complex object, composed of other objects. after having 
populated my complex obj in the model layer, i' ve to persist it: in my 
database i have a main object table and other related table, 1 to1,1 to 
many,many to many.
I have a dao and a gateway for every object, so in witten a facade layer
to 
persist my compmex object, having:

<cfset objfacade.write(mycomplexObj)/>

in the facade i have

<cfset mainObjDAO.create()/>
<cfset relatedObj_1DAO.create()/>
....
<cfset relatedObj_nDAO.create()/>

can i encapsulate all the last invocattion in a transaction

<cftransaction>
    <cfset mainObjDAO.create()/>
    <cfset relatedObj_1DAO.create()/>
    ....
    <cfset relatedObj_nDAO.create()/>

</transaction>
regards
salvatore



----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to
[email protected] with the words 'unsubscribe cfcdev' as the subject of
the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting
(www.cfxhosting.com).

An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]




----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to 
[email protected] with the words 'unsubscribe cfcdev' as the subject of the 
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
(www.cfxhosting.com).

An archive of the CFCDev list is available at 
www.mail-archive.com/[email protected]


Reply via email to