Hi there
 
I'm new to DBIx::Class, and am having problems understanding the syntax
of many_to_may relationshiops.

I have spent some times finding and reading the various docs but get
stuck with (from Cookbook):

__PACKAGE__->has_many('user_address' => 'My::UserAddress', 'user');
__PACKAGE__->many_to_many('addresses' => 'user_address', 'address');

Is the following reading correct?

__PACKAGE__->has_many(
    $table_name, $tables_object, $primary_key
);
 __PACKAGE__->many_to_many(
    $table_name, $table_name_from_has_many, $primary_key
);

If it is, I have other problems...!

Thanks in anticipation
Lee

_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/

Reply via email to