Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Catalyst: Dev

some features do not work in new version

 

 

Catalyst dev RSS feed   Index | Next | Previous | View Threaded


willbelair at yahoo

Jul 10, 2009, 8:24 AM

Post #1 of 2 (920 views)
Permalink
some features do not work in new version

Hi,
My first application developed with catalyst was few years, and the version is 5.7 . Recently I upgrade catalyst to 5.8 and working on a new application. One thing that does not work in this new framework is the relationship among tables defined in /Schema/Result/xxx.pm. I'm not sure if I've read all the newly updated document, if so, please kindly show point me to the docs. What does not work is: in the old version, after I defined the relationship has_many and belongs_to , I can do in the controller something like: 
my $role = $user->user_role->role->RoleName
where $user is the result set from user table, and user_role, role are related tables, and RoleName is a field in role table.
Now in this newest version, catalyst gave me an error saying that cannot define the method "RoleName" .
I just wonder if this is not supported
by catalyst or dbix anymore?

Thank you,
Will


Instant message from any web browser! Try the new Yahoo! Canada Messenger for the Web BETA


__________________________________________________________________
Get a sneak peak at messages with a handy reading pane with All new Yahoo! Mail: http://ca.promos.yahoo.com/newmail/overview2/


bobtfish at bobtfish

Jul 11, 2009, 5:12 PM

Post #2 of 2 (835 views)
Permalink
Re: some features do not work in new version [In reply to]

On 10 Jul 2009, at 16:24, Will Smith wrote:

>
>
>
> Hi,
> My first application developed with catalyst was few years, and the
> version is 5.7 . Recently I upgrade catalyst to 5.8 and working on
> a new application. One thing that does not work in this new
> framework is the relationship among tables defined in /Schema/
> Result/xxx.pm. I'm not sure if I've read all the newly updated
> document, if so, please kindly show point me to the docs. What does
> not work is: in the old version, after I defined the relationship
> has_many and belongs_to , I can do in the controller something like:
> my $role = $user->user_role->role->RoleName
> where $user is the result set from user table, and user_role, role
> are related tables, and RoleName is a field in role table.
> Now in this newest version, catalyst gave me an error saying that
> cannot define the method "RoleName" .
> I just wonder if this is not supported by catalyst or dbix anymore?

This should still work as before, I think you're doing something
wrong somewhere, but I'm afraid there isn't enough information here
to help you.

As this is specifically a DBIx::Class problem, I'd suggest you mail
the DBIx::Class list and give them a full error message and the
schema and result classes concerned..

Cheers
t0m


_______________________________________________
Catalyst-dev mailing list
Catalyst-dev[at]lists.scsys.co.uk
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev

Catalyst dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.