[Dbix-class] Re: [Catalyst] relationship or user problem
Will Hawes
info at whawes.co.uk
Mon Feb 6 23:08:35 CET 2006
Wijnand Wiersma wrote:
>
> Op 6-feb-2006, om 18:09 heeft Will Hawes het volgende geschreven:
>>
>> Strictly speaking this is a DBIx::Class question, so CC'd to that list.
>>
> Ok, I wasn't sure it was a pure DBIx::Class question but I am convinced
> now.
> I will CC too.
>
>> What version of DBIx::Class are you using, and what do you get if you
>> dump the contents of a) c.user.user and b) c.user.user.pskills?
>
> Version 0.05000
> Well, when I use $c->log->dumper($c->user->user); I get 453 lines of
> output. It seems it dumps everything known to Catalyst.
> Are all those lines needed?
> Anyway, that dump is at http://nedbsd.nl/~wijnand/catalystdump1.txt
According to the dump, your bsdjobs::Model::DBIC::Person object has a
relationship named "pskill" but none named "pskills". Perhaps a typo is
to blame (double check what is in your has_many declaration for that
relationship).
> It did not help me much but I don't know where to look.
>
> I don't know what the second one to dump should be, I tried
> $c->user->user->{pskills} but that one was undef and
> $c->user->user->pskills() resulted in
> Can't locate object method "pskills" via package
> "bsdjobs::Model::DBIC::Person"
More information about the Dbix-class
mailing list