Dan,
By default reactor use transactions to save objects but you could wrap your code between <cftransactions and when doing save pass false as argument so the save is not surrounded by the reactor's default <cftransaction/>.


<cftransaction>
...
<cfset record.save(false)>
...
</cftransaction>

João Fernandes


On 8/11/06, Dan Sorensen <[EMAIL PROTECTED]> wrote:

Is a cftransaction type of commit/rollback possible with Reactor?

 

I have two records to insert in sequence. I'd like to validate both of them and only commit them together. The catch is that the 2nd record depends on getting the last_insert_id from the first record created during the 1st record.save() step. Normally I'd have 3 queries (insert 1, get_last_id, insert 2) setup within a cftransaction.

 

I'm sure this is a common issue, what's the best practice? Any feedback on this topic would be great.

Thanks in advance!

Dan

 

P.S. This is more of a concept question, so I'm leaving code out, but let me know if code would be helpful.

 


-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
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/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

Reply via email to