Re: [RDBO] Still fighting with transactions

2007-08-15 Thread John Siracusa
On 8/15/07 3:11 AM, Michael Lackhoff wrote: On 14.08.2007 22:43 John Siracusa wrote: Assuming your have AutoCommit turned off, that's why $obj was not saved. The rollback rolled back everything done since the last begin_work(). Well, I didn't switch AutoCommit on or off Was it on or off

Re: [RDBO] Still fighting with transactions

2007-08-15 Thread Perrin Harkins
On 8/15/07, Michael Lackhoff [EMAIL PROTECTED] wrote: Well, I didn't switch AutoCommit on or off and I didn't do a rollback myself, so the question remains why the default configuration with Apache::DBI and init_db(MyApp::DB-new) does a rollback when the database is accessed from a new db (in

Re: [RDBO] Still fighting with transactions

2007-08-15 Thread Graham Barr
On Wed, August 15, 2007 7:54 am, John Siracusa wrote: The real question is, why is some_helper_that_uses_db() causing a rollback? Turn on DBI-trace(1) to be sure it actually is, and maybe try to create a small test case. the problem is in init_dbh. Rose::DB does not know that the $dbh it get

Re: [RDBO] Still fighting with transactions

2007-08-15 Thread Perrin Harkins
On 8/15/07, Graham Barr [EMAIL PROTECTED] wrote: So either init_dbh needs to be able to detect that the $dbh it gets is a reuse of an existing connection, or Rose::DB-new needs to return the same object for all calls for the same connection. Even if init_dbh is changed, I think Apache::DBI

Re: [RDBO] help specifying a default datetime with SQLite and RDBO::Loader

2007-08-15 Thread George Hartzell
John Siracusa writes: On 8/14/07, George Hartzell [EMAIL PROTECTED] wrote: The default value of now does work when used in the RDBO perl module. The problem is that since I'm using RDBO::Loader, the only way to get that value in there is to use it in the SQL, where it doesn't do

Re: [RDBO] Still fighting with transactions

2007-08-15 Thread Tim Bunce
On Wed, Aug 15, 2007 at 01:06:01PM -0500, Graham Barr wrote: Rose::DB does not know that the $dbh it get back from connect is not a newly connected handle. As a result is still goes ahead and calls init_dbh which will set all the dbh attributes to the defaults. The standard approach I

[RDBO] guessing method name for many-to-many counting method.

2007-08-15 Thread George Hartzell
I have a many-to-many relationship between a pair of tables, using a mapping table, that Rose::DB::Object::Loader sets up properly for me. I can use (e.g.) $widget-add_colors($a_color) to add colors to the widget, so I think it's working right. I'd like to get a count of the number of colors

Re: [RDBO] Still fighting with transactions

2007-08-15 Thread John Siracusa
On 8/15/07, Graham Barr [EMAIL PROTECTED] wrote: On Wed, August 15, 2007 7:54 am, John Siracusa wrote: The real question is, why is some_helper_that_uses_db() causing a rollback? Turn on DBI-trace(1) to be sure it actually is, and maybe try to create a small test case. the problem is in

Re: [RDBO] Still fighting with transactions

2007-08-15 Thread Graham Barr
On Aug 15, 2007, at 7:56 PM, John Siracusa wrote: On 8/15/07, Graham Barr [EMAIL PROTECTED] wrote: On Wed, August 15, 2007 7:54 am, John Siracusa wrote: The real question is, why is some_helper_that_uses_db() causing a rollback? Turn on DBI-trace(1) to be sure it actually is, and maybe