[Bast-commits] r4884 - DBIx-Class/0.08/trunk/lib/DBIx/Class
castaway at dev.catalyst.perl.org
castaway at dev.catalyst.perl.org
Sun Oct 5 21:46:56 BST 2008
Author: castaway
Date: 2008-10-05 21:46:56 +0100 (Sun, 05 Oct 2008)
New Revision: 4884
Modified:
DBIx-Class/0.08/trunk/lib/DBIx/Class/Relationship.pm
Log:
Fix incorrect relationship docs!
Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Relationship.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Relationship.pm 2008-10-05 18:47:40 UTC (rev 4883)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Relationship.pm 2008-10-05 20:46:56 UTC (rev 4884)
@@ -31,9 +31,9 @@
MyDB::Schema::Actor->many_to_many('roles' => 'actorroles', 'role');
## Using relationships
- $schema->resultset('Actor')->roles();
- $schema->resultset('Role')->search_related('actors', { Name => 'Fred' });
- $schema->resultset('ActorRole')->add_to_roles({ Name => 'Sherlock Holmes'});
+ $schema->resultset('Actor')->find({ id => 1})->roles();
+ $schema->resultset('Role')->find({ id => 1 })->actorroles->search_related('actor', { Name => 'Fred' });
+ $schema->resultset('Actor')->add_to_roles({ Name => 'Sherlock Holmes'});
See L<DBIx::Class::Manual::Cookbook> for more.
More information about the Bast-commits
mailing list