Re: [CDBI] class::dbi::loader and transaction
Perrin Harkins <[email protected]>
| Newsgroups | gmane.comp.lang.perl.modules.class-dbi |
|---|---|
| Message-ID | <[email protected]> |
James. L wrote: > in do_transaction, i can > only pass a particular table class but it won't roll > back the changes on other tables when failed. No, transactions are at the database level. A rollback affects all work done since the last commit. It has nothing to do with your classes. > I guess that i need a base class like Music::DBI or > something? Not really. You don't need that "do_transaction" sub at all. All you have to do is turn off AutoCommit and call dbi_commit() or dbi_rollback(). If you want to use it though, it probably is best in a base class. - Perrin