Re: [CDBI] Re: Error deleting object with has_many instances

[prev] [thread] [next] [Date index for 2006/02/08]

From: Peter Speltz
Subject: Re: [CDBI] Re: Error deleting object with has_many instances
Date: 03:05 on 08 Feb 2006
On 2/7/06, Perrin Harkins <perrin@xxxx.xxx> wrote:
> On Tue, 2006-02-07 at 16:37 -0600, Peter Speltz wrote:
> > I think this maybe a perpared_cached issue or something.  I read some
> > on another post and tried :
> > $self->db_Main->{CachedKids} =3D {};
> > $self->db_Main->{mysql_auto_reconnect} =3D 0;
>
> It doesn't look like a MySQL or DBI issue -- Class::DBI just seems to be
> generating invalid SQL.  I've never seen this error, but I don't use
> your version (I run 0.96).
>
> Why don't you post the code that sets up the has_many and the classes in
> question?
>
> - Perrin
>
>

Ahh. After much printing of debugging statements and wrapping things
in eval throughout the call,  I found the cause. I'm so fired .   Its
embarassing. :)
 I had installed the  SVN version of Maypole which changed its
"delete"  method in the model class. I had forgotten that Maypole
Model CDBI has a delete method.  That pesky"delete" method was redone
and failed on  deletes made from a cascade but worked when there was
no cascade.

I always forget about those poorly named methods. I dont even know how
to call Class::DBI 's delete. :)  What would that be
$self->SUPER->SUPER::delete?  I'm cutting that method out of my copy=20
Maypole::Model::CDBI.pm

Thanks Perrin.

_______________________________________________
ClassDBI mailing list
ClassDBI@xxxxx.xxxxxxxxxxxxxxxx.xxx
http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi

Re: [CDBI] Re: Error deleting object with has_many instances
Peter Speltz 03:05 on 08 Feb 2006

Generated at 23:19 on 12 Feb 2006 by mariachi v0.52