From: Jess Robinson Date: Sun, 5 Oct 2008 20:46:56 +0000 (+0000) Subject: Fix incorrect relationship docs! X-Git-Tag: v0.08240~338 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c9070342751920cd363a24b065b75fbc2a466d25;p=dbsrgits%2FDBIx-Class.git Fix incorrect relationship docs! --- diff --git a/lib/DBIx/Class/Relationship.pm b/lib/DBIx/Class/Relationship.pm index 8de8cc0..228499b 100644 --- a/lib/DBIx/Class/Relationship.pm +++ b/lib/DBIx/Class/Relationship.pm @@ -31,9 +31,9 @@ DBIx::Class::Relationship - Inter-table relationships 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 for more.