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 <[email protected]>
To: [email protected], The elegant MVC web framework
<[email protected]>
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



-- 

==========================================================
united-domains AG - The Domain People.
Gautinger Strasse 10
D-82319 Starnberg
Tel. + 49 (0) 81 51 / 3 68 67 - 33
Fax + 49 (0) 81 51 / 3 68 67 - 77
http://www.united-domains.de
----------------------------------------------------------
Sitz: Starnberg, HRB 127020 (AG München)
Vorstand: Florian Huber (Vors.)
Alexander Helm, Markus Eggensperger
Aufsichtsrat: Norbert Lang (Vors.)
==========================================================

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[email protected]

Reply via email to