On 10/22/07, Jesper Krogh <[EMAIL PROTECTED]> wrote: > > On 10/20/07, Jesper Krogh <[EMAIL PROTECTED]> wrote: > > I'll work out a patch for this sometime this weekend, we'll see on IRC > > where it should go, as far as who it breaks, etc. > > Let me know when there is something to test? >
Well, I started on this, then in thinking about it more I realized that the proposed solution (requiring that we're in an explicit transaction before allowing database statements to go through w/o AutoCommit) won't work in the general case either. This is because most of the other CPAN DBIC code people are likely to use isn't going to use transactions for everything. It's perfectly legitimate for some CPAN DBIC-related module to do an isolated statement with no explicit txn. Under AutoCommit this will normally just work, and if you want it to be part of a larger txn, that works too. But if we enforced explicit txns w/ AutoCommit off, then it would fail when you made some innocuous call like $c->user_exists (which in turn might do so magic on your User table underneath, and you didn't think to wrap it in an explicit DBIC txn at the outer layer). So I guess what I'm saying is that forcing AutoCommit=>0 users to use explicit txns everywhere isn't compatible with the idea of generic DBIC modules/plugins and the idea of allowing AutoCommit=>1 users to not wrap everything in txns. I'm still thinking... -- Brandon _______________________________________________ List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/ Searchable Archive: http://www.grokbase.com/group/[EMAIL PROTECTED]
