Logged as http://trac.reactorframework.org/reactor/ticket/59 and http://trac.reactorframework.org/reactor/ticket/60
On 8/21/06, João Fernandes <[EMAIL PROTECTED]> wrote:
Mark, You should log it in the trac site ( http://trac.reactorframework.com/reactor ). Doug will decide which is better for the framework. I personally like the config variable idea. João Fernandes -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mark Stanton Sent: segunda-feira, 21 de Agosto de 2006 10:19 To: [email protected] Subject: Re: [Reactor for CF] Default value for useTransaction should be configurable in reactor.xml? Hi Tom No it doesn't explode at all, MySQL just ignores the transaction related commands. The only problem I have had is with CF throwing "Nested transactions are not supported.". This is not related to the specific point I am making now, but it is what lead me down this path of thinking about transactions. However its a point I am interested in... Ready for the tangent? I have a CNRecord (Contract Notice) object which has a 1:1 relationship to ContractRecord object and a nullable many to many relationship with ConfidentialityProvisions. Stated in plain english a CN is a type of Contract that can have zero or more Confidentiality Provisions associated with it. When I go to delete a CN I want to delete the relevant Contract and also delete all the relevant join data in the CN_ConfidentialityProvision. The obvious choice for me is the beforeDelete() or afterDelete() plugin point. So I end up with some code like this in my CNRecord.cfc: <cffunction name="beforeDelete" ....> <cfif NOT isDeleted()> <cfif NOT getContract().isDeleted()> <cfset getContract().delete(false)> </cfif> <cfset getCN_ConfidentialityProvisionIterator().deleteAll()> </cfif> </cffunction> Which is implicitly run when I rin CNRecord.delete(false). In the above example the getCN_ConfidentialityProvisionIterator().deleteAll() gets wrapped in transactions and I have no way of telling reactor not to do so. This doesn't bother me because I am kicking this all off with a delete(false), but for folks who are using transactions how would you get the above code to run with nested transaction errors? The only way I can see would be to loop over the Records in the iterator and nuke them one at a time with delete(false). Thoughts? -- Mark Stanton Gruden Pty Ltd http://www.gruden.com -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Reactor for ColdFusion Mailing List [email protected] Archives at: http://www.mail-archive.com/reactor%40doughughes.net/ -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Reactor for ColdFusion Mailing List [email protected] Archives at: http://www.mail-archive.com/reactor%40doughughes.net/ -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- Mark Stanton Gruden Pty Ltd http://www.gruden.com -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Reactor for ColdFusion Mailing List [email protected] Archives at: http://www.mail-archive.com/reactor%40doughughes.net/ -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
