|
Yes! J Doug From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Brian Kotek Doug, are the
transactions enabled by default (if you pass no args, are the enabled)? Thanks. On 4/25/06, Doug
Hughes < [EMAIL PROTECTED]>
wrote: I went ahead and implemented as I described. I didn't add the
isolation level. If you need that then you can turn off transactions and
use your own cftransaction tag. 50/50 that this will be committed tonight. From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
On Behalf Of Paul Kenney
In that case, I might also suggest that an additional
argument could be isolation level for the new transaction... or set it as a
property of the Record object. But that might be asking too much :) On
4/25/06, Chris Phillips <[EMAIL PROTECTED]>
wrote: I like
that! On
4/25/06, Doug Hughes <[EMAIL PROTECTED]> wrote:
Paul, I think I'm going to be removing transactions from the DAOs
altogether. I'll be adding them into the load / save / delete methods of
records. A new, optional, attribute will be added to these methods to
indicate if the methods should use a transaction or not. For example: <!--- implicitly use transactions to save ---> <cfset user.save() /> <!--- explicitly use transactions ---> <cfset user.save(useTransaction=true) /> <!--- explicitly don't use transactions ---> <cfset user.save(useTransaction=false) /> So, let's say your user hasOne address. You load a user
and update it and its address. By calling user.save() the entire thing
would be executed in a transaction. All of the child saves would have
useTransaction set to false. You could also wrap the save in a transaction tag and pass in
useTransaction=false. This would allow you to run more than one saves of
not-necessarily-related objects in one transaction. This should be simple to implement. I might just do
this tonight. There's a 50/50 chance I'll be checking in the validation
updates tonight too. Doug
--
-- Reactor for ColdFusion Mailing List -- [email protected] -- Archives at http://www.mail-archive.com/reactor%40doughughes.net/
|
- [Reactor For CF] Transactions... Paul Kenney
- RE: [Reactor For CF] Transactions... Doug Hughes
- SV: [Reactor For CF] Transactions... Tormod Boga
- Re: [Reactor For CF] Transactions... Paul Kenney
- RE: [Reactor For CF] Transactions... Doug Hughes
- Re: [Reactor For CF] Transactions... Chris Phillips
- Re: [Reactor For CF] Transactions... Paul Kenney
- RE: [Reactor For CF] Transact... Doug Hughes
- Re: [Reactor For CF] Transact... Paul Kenney
- Re: [Reactor For CF] Transact... Brian Kotek
- RE: [Reactor For CF] Transact... Doug Hughes
- Re: [Reactor For CF] Transactions... Daryl

