[Catalyst] Tutorial woes.

John Napiorkowski jjn1056 at yahoo.com
Thu Aug 11 02:20:10 GMT 2011


From: Roderick A. Anderson <raanders at cyber-office.net>
>To: The elegant MVC web framework <catalyst at lists.scsys.co.uk>
>Sent: Wednesday, August 10, 2011 7:06 PM
>Subject: [Catalyst] Tutorial woes.
>
>I can't find where my error is while doing the tutorial.
>
>I make it all the way to end of 06 Authorization and suddenly I get errors starting with:
>
>Couldn't render template "books/list.tt2: undef error - search_related: result source 'UserRole' has no such relationship role_id at /usr/lib/perl5/site_perl/5.8.8/DBIx/Class/Schema.pm line 1071
>
>The only difference is I didn't use the code for encrypted passwords and did not encrypt them in the database.
>
>This is on a CentOS 5 Linux-vserver guest and as you can see I haven't put in a newer (more recent) version of Perl.
>
>I have looked to to see if I missed some code and have checked in the database to make sure test01/mypass is in there.
>
>Here are the results of a recursive grep starting at MyApp looking for role_id.
>
>lib/MyApp/Schema/Result/User.pm:110:__PACKAGE__->many_to_many(roles => 'user_roles', 'role_id');
>lib/MyApp/Schema/Result/UserRole.pm:32:=head2 role_id
>lib/MyApp/Schema/Result/UserRole.pm:43:  "role_id",
>lib/MyApp/Schema/Result/UserRole.pm:46:__PACKAGE__->set_primary_key("user_id", "role_id");
>lib/MyApp/Schema/Result/UserRole.pm:61:  { id => "role_id" },
>lib/MyApp/Schema/Result/Role.pm:60:  { "foreign.role_id" => "self.id" },
>myapp02.sql:21: role_id INTEGER REFERENCES role(id) ON DELETE CASCADE ON UPDATE CASCADE,
>myapp02.sql:22:                 PRIMARY KEY (user_id, role_id)
>Binary file myapp.db matches
>
>Does anything catch your collective eye?

Can we see your UserRole result class in its entirety?  --John

>
>TIA,
>Rod
>-- 
>_______________________________________________
>List: Catalyst at lists.scsys.co.uk
>Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
>Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
>Dev site: http://dev.catalyst.perl.org/
>
>
>



More information about the Catalyst mailing list