[Dbix-class] Re: [Catalyst] relationship or user problem
Wijnand Wiersma
wijnand at nedbsd.nl
Mon Feb 6 23:37:06 CET 2006
Op 6-feb-2006, om 23:22 heeft Will Hawes het volgende geschreven:
> Wijnand Wiersma wrote:
>> Op 6-feb-2006, om 23:08 heeft Will Hawes het volgende geschreven:
>>>> 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).
>> __PACKAGE__->has_many('pskills' =>
>> 'bsdjobs::Model::DBIC::Pskills', 'person');
>> I used pskills everywhere, I can't find pskill anywhere.
>> I just double checked it to be sure.
>
> That's very odd. Do things work if you change your template code to
> "c.user.user.pskill" instead of "c.user.user.pskills"?
Uhm, yes. That really is odd.
That fixes it in another page where I just retrieved a person and did
the same loop.
It still doesn't work as should when using c.user.user.pskill, but it
does print 3 times skill.name and that person has 3 skills listed so
a different problem.
But that is not a DBIx problem.
Thank you Will for your sharp eye, I really couldn't see the
difference :-)
Wijnand
More information about the Dbix-class
mailing list