X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FRelationship.pm;h=67e4f68f84ec6d90c052d10492a4150b54d775a2;hb=ed899df367fc90a6b30f1e17d0ea4e2bc2e094f6;hp=3479ac2bf28d782f4a1ed17dc0635e5bf8eacf0b;hpb=cef1bddae9e76fe52c0ca064acea9fc961977d24;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Relationship.pm b/lib/DBIx/Class/Relationship.pm index 3479ac2..67e4f68 100644 --- a/lib/DBIx/Class/Relationship.pm +++ b/lib/DBIx/Class/Relationship.pm @@ -39,6 +39,9 @@ See L for more. =head1 DESCRIPTION +The word I has a specific meaning in DBIx::Class, see +the definition in the L. + This class provides methods to set up relationships between the tables in your database model. Relationships are the most useful and powerful technique that L provides. To create efficient database queries, @@ -102,20 +105,20 @@ L. All helper methods are called similar to the following template: - __PACKAGE__->$method_name('relname', 'Foreign::Class', $cond, $attrs); + __PACKAGE__->$method_name('relname', 'Foreign::Class', \%cond | \@cond, \%attrs); Both C<$cond> and C<$attrs> are optional. Pass C for C<$cond> if -you want to use the default value for it, but still want to set C<$attrs>. +you want to use the default value for it, but still want to set C<\%attrs>. See L for documentation on the -attrubutes that are allowed in the C<$attrs> argument. +attrubutes that are allowed in the C<\%attrs> argument. =head2 belongs_to =over 4 -=item Arguments: $accessor_name, $related_class, $our_fk_column|\%cond|\@cond?, \%attr? +=item Arguments: $accessor_name, $related_class, $our_fk_column|\%cond|\@cond?, \%attrs? =back @@ -225,7 +228,7 @@ which can be assigned to relationships as well. =over 4 -=item Arguments: $accessor_name, $related_class, $their_fk_column|\%cond|\@cond?, \%attr? +=item Arguments: $accessor_name, $related_class, $their_fk_column|\%cond|\@cond?, \%attrs? =back @@ -358,7 +361,7 @@ which can be assigned to relationships as well. =over 4 -=item Arguments: $accessor_name, $related_class, $their_fk_column|\%cond|\@cond?, \%attr? +=item Arguments: $accessor_name, $related_class, $their_fk_column|\%cond|\@cond?, \%attrs? =back @@ -442,7 +445,7 @@ which can be assigned to relationships as well. =over 4 -=item Arguments: $accessor_name, $related_class, $their_fk_column|\%cond|\@cond?, \%attr? +=item Arguments: $accessor_name, $related_class, $their_fk_column|\%cond|\@cond?, \%attrs? =back @@ -529,10 +532,14 @@ which can be assigned to relationships as well. =over 4 -=item Arguments: $accessor_name, $link_rel_name, $foreign_rel_name, \%attr? +=item Arguments: $accessor_name, $link_rel_name, $foreign_rel_name, \%attrs? =back +C is a I which has a specific +meaning in DBIx::Class, see the definition in the +L. + C 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