On 8/15/07 10:08 PM, Graham Barr wrote:
> On Aug 15, 2007, at 7:56 PM, John Siracusa wrote:
>> The only dbh attributes that get set in init_dbh() after the
>> DBI->connect() call are the ones that don't (apparently?) work if
>> passed as connect options.
>
> You are right, sorry.
>
> It is DBI->c
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
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
On 8/15/07, George Hartzell <[EMAIL PROTECTED]> wrote:
> I'd like to get a count of the number of colors associated with a
> widget. I know that I could just fetch them and count them, but I
> thought that the relationship might provide a count method and now I'm
> distracted by the generic questi
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 as
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 rec
On Wed, Aug 15, 2007 at 01:06:01PM -0500, Graham Barr wrote:
>
> in Rose::DB AutoCommit has a default of 1. In my case that is the default
> I want. But when Rose::DB->new is called and there is currently an active
> transation, the code in init_dbh will reset AutoCommit to 0.
Perhaps connect_cac
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
> > do
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::DB
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
On 15.08.2007 18:47 Perrin Harkins wrote:
> I have a guess. Looking at the new code in Apache::DBI, I see that it
> now tries to reset the state of the $dbh every time you call
> connect(). This probably breaks the begin_work() state.
>
> I'm not sure why this was added, since it seems like thi
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 d
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
On 14.08.2007 22:43 John Siracusa wrote:
> On 8/14/07, Michael Lackhoff <[EMAIL PROTECTED]> wrote:
>> On 14.08.2007 20:34 John Siracusa wrote:
>>> On 8/14/07, Michael Lackhoff <[EMAIL PROTECTED]> wrote:
$db->begin_work;
my $obj = Products->new(db => $db);
...
$obj->save;
s
14 matches
Mail list logo