I got bit by this today, and I thought that it could be quite a bit more
obvious and clear that many_to_many is not a true relationship.  Patch
attached.

- Ted Carnahan
[EMAIL PROTECTED]

Index: lib/DBIx/Class/Relationship.pm
===================================================================
--- lib/DBIx/Class/Relationship.pm	(revision 2858)
+++ lib/DBIx/Class/Relationship.pm	(working copy)
@@ -308,9 +308,11 @@
 
   My::DBIC::Schema::Role->many_to_many( actors => 'actor_roles', 'actor' );
 
-Creates accessors bridging two relationships; not strictly a relationship in
-its own right, although the accessor will return a resultset or collection of
-objects just as a has_many would.
+Many_to_many is not strictly a relationship in its own right. Instead, it is
+a bridge between two resultsets which provide the same kind of convenience
+accessors as true relationships provide. Although the accessor will return a 
+resultset or collection of objects just like has_many does, you cannot call 
+C<$related_resultset> and similar methods which operate on true relationships.
 
 In the above example, ActorRoles is the link table class, and Role is the
 foreign class. The C<$link_rel_name> parameter is the name of the accessor for
_______________________________________________
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