Problems with delete

[prev] [thread] [next] [Date index for 2004/12/14]

From: JJ Merelo
Subject: Problems with delete
Date: 11:38 on 14 Dec 2004
Hi again,
I'm having trouble using the humble and simple 'delete'. Here's a bit of code:
--

$persona->add_to_roles( { simposio_codigo => 'S0', rol_tipo => 'metachair' } );
my @roles = $persona->roles;
is( $roles[0]->rol_tipo, 'metachair' );
$roles[0]->delete;

--

Which issues the not-so-humble error:
--
Attempt to free unreferenced scalar: SV 0xa0ad34c at
/usr/lib/perl5/5.8.3/Test/Builder.pm line 1329.
	Test::Builder::_ending('Test::Builder=ARRAY(0x9af33d4)') called at
/usr/lib/perl5/5.8.3/Test/Builder.pm line 1373
	Test::Builder::END() called at
/opt/home/jmerelo/progs/CEDI/perl/t/01-persona.t line 0
	eval {...} called at /opt/home/jmerelo/progs/CEDI/perl/t/01-persona.t line 0
--

I'm using Class::DBI::Pg on a postgres 7.4 setup. Delving into code,
the SQL seems to be generated correctly. And I don't seem to be doing
anything special, other than the fact that the 'rol' class does not
have a primary key:

__PACKAGE__->table('rol');
__PACKAGE__->columns( Essential => qw( persona_id simposio_codigo rol_tipo) );

__PACKAGE__->has_a( persona_id => 'My::CEDI::Persona' );
__PACKAGE__->has_a( simposio_codigo => 'My::CEDI::Simposio' );

Is there a problem here? I have the same problem in other classes, anyways.

JJ

Problems with delete
JJ Merelo 11:38 on 14 Dec 2004

Re: Problems with delete
Perrin Harkins 21:06 on 14 Dec 2004

Re: Problems with delete
JJ Merelo 14:44 on 22 Feb 2005

Generated at 11:30 on 23 Feb 2005 by mariachi v0.52