I'm in a position where a component can have a parent/child relationship
with other components of the same type.
When I delete a single component, no problem - the method starts a
transaction, deletes the component information from the database, cleans
up references to it in several join tables and updates a couple of
administrative tables.
When a component has Children I would like to delete them as well in the
same transaction. The best way to do this, of course, is to loop
through the children and call their "delete()" methods.
However when I do this (as I am) from with the parents delete() method
(making the call sorta recursive-like) I get the error we all know and
love: "Cannot nest CFTRANSACTIONS"
In short I don't want to really nest a transaction (that makes no real
sense) I simply want a way to include all the work in a single
transaction. Some way to determine if I'm in a transaction already and
not try to start a new one.
I'm trying to find some way to do this, perhaps by catching and using
the nesting error itself - but nothing remotely elegant is presenting
itself.
Any solutions, ideas or workarounds?
Jim Davis
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
- Re: security flaw in web services Thomas Chiverton
- RE: security flaw in web services Andy Ousterhout
- Errors in table Design view of Dreamweaver MX 2004... Angel Stewart
- RE: Errors in table Design view of Dreamweaver... Barney Boisvert
- Re: Errors in table Design view of Dreamweaver... Les Mizzell
- Re: Errors in table Design view of Dreamweaver... Les Mizzell
- Can't CFRETURN inside include! Jim Davis
- RE: Can't CFRETURN inside include! Hal Helms
- RE: Nesting CFTRANSACTION? Jim Davis
- RE: Nesting CFTRANSACTION? Kola Oyedeji
- RE: Nesting CFTRANSACTION? Andre Mohamed
- RE: Nesting CFTRANSACTION? Jim Davis
- Re: Nesting CFTRANSACTION? Christian Cantrell
- RE: Nesting CFTRANSACTION? Jim Davis
- Re: security flaw in web services Kevin Graeme
- Re: security flaw in web services Jochem van Dieten
- Re: security flaw in web services Kevin Graeme
- Re: security flaw in web services Jochem van Dieten
- Re: security flaw in web services Bryan Stevenson