[Catalyst] Can't get my db classes to have relations
Matt S Trout
dbix-class at trout.me.uk
Sat Jul 8 01:37:11 CEST 2006
Dennis Daupert wrote:
> I'm stuck on one point regarding setting up db relationships.
>
> I keep getting this error:
>
> <snip>"Cannot load schema class 'Catapult::Schema::CatapultDB':
> DBIx::Class::Relationship::BelongsTo::belongs_to(): Can't infer join
> condition for user on Catapult::Schema::CatapultDB::UserRoles; unable to
> load CatapultDB::Users at
> /home/perl/cat/Catapult/script/../lib/Catapult/Schema/CatapultDB/UserRoles.pm
> line 23
>
> ******************
> Line 23 of CatapultDB::UserRoles is:
>
> __PACKAGE__->belongs_to(user => 'CatapultDB::Users', 'user_id');
And the class is called Catapult::Schema::CatapultDB::Users.
Try passing it the class name that actually exists :)
--
Matt S Trout Offering custom development, consultancy and support
Technical Director contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd. mst (at) shadowcatsystems.co.uk for more information
+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +
More information about the Catalyst
mailing list