[Dbix-class] [Fwd: Re: [Catalyst] db delete]

Alexander Hartmaier alexander.hartmaier at t-systems.at
Fri May 21 08:31:50 GMT 2010


Are you using Catalyst::Model::DBIC::Schema or the old
Catalyst::Model::DBIC?
If the old one convert your Catalyst Model to
Catalyst::Model::DBIC::Schema which will likely fix the problem.

--
Best regards, Alex


Am Mittwoch, den 12.05.2010, 18:53 +0200 schrieb Stuart Dodds:
> This message is being forwarded to this mailing list from the Catalyst
> mailing list as i was told it had more relevance here...does anybody
> have any ideas?
>
> Hi,
>
> I recently updated all the Catalyst and DBIC modules on my system and
> afterwards i started having problems performing deletes in the database
> with Catalyst. I'll go straight ahead and give you the error message:
>
> Caught exception in Project::Controller::TldMethods->delete "Not a HASH
> reference at .../perl5/Class/Accessor/Grouped.pm line 284."
>
> this happens after doing the following:
>
> my $object = $c->model('DB::Object')->find($id);
> $c->log->debug(ref $object); # Project::Model::DB::Object
> $object->delete;
>
> however...i have isolated that this must be something to do with the
> Catalyst Model as i dont have any trouble deleting when i just use
> straight DBIC:
>
> my $schema = DB->connect( $dsn, $user, $pass, );
> my $object = $schema->resultset('Object')->find($id);
> print ref($object); # DB::Object
> $object->delete;
>
> ...this works properly.
>
> Furthermore, this problem only happens with the delete command on the db
> object in Catalyst...all other accessor/update/create methods work fine.
>
> (sorry if this problem has already been posted but i only joined the
> mailing list today)
>
> Many thanks,
>
> Stuart.
>
>
>
> -------- Forwarded Message --------
> From: Tomas Doran <bobtfish at bobtfish.net>
> To: dodds at united-domains.de, The elegant MVC web framework
> <catalyst at lists.scsys.co.uk>
> Subject: Re: [Catalyst] db delete
> Date: Wed, 12 May 2010 18:44:20 +0200
>
> On 12 May 2010, at 17:12, Stuart Dodds wrote:
> > This is more of a Catalyst/DBIx problem and i've probably got it wrong
> > and it should be in the DBIx mailing list, but i know most of you guys
> > here use both, so hopefully someone can help me out.
>
> Yes, this should be on the DBIC mailing list, sorry.
>
> Also, you mean DBIC, not DBIx (which is a namespace for DBI
> eXtensions, containing many many projects).
>
> Cheers
> t0m
>
>
>


*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
T-Systems Austria GesmbH   Rennweg 97-99, 1030 Wien
Handelsgericht Wien, FN 79340b
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
Notice: This e-mail contains information that is confidential and may be privileged.
If you are not the intended recipient, please notify the sender and then
delete this e-mail immediately.
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*



More information about the DBIx-Class mailing list