[Catalyst] relationship or user problem

Wijnand Wiersma wijnand at nedbsd.nl
Mon Feb 6 22:18:51 CET 2006


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
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"

Another strange thing: when I did the first dump I got the following  
error from Catalyst:
Couldn't render template "undef error -  
DBIx::Class::AccessorGroup::__ANON__(): Couldn't insert short => MD  
into countrycodes at /Users/wijnand/develop/bsdjobs/root/viewperson  
line 16"

The country column from the person table is also a foreign key to the  
countrycodes table to convert the code into a nice name.
This works ok but when I start to dump $c->user->user I get this error.

Anyone has a good pointer for me?

Wijnand





More information about the Catalyst mailing list