=head2 add_relationship
-=over 4
-
-=item Arguments: $relname, $related_source_name, \%cond, [ \%attrs ]
-
-=item Return value: 1/true if it succeeded
-
-=back
-
- $source->add_relationship('relname', 'related_source', $cond, $attrs);
-
-L<DBIx::Class::Relationship> describes a series of methods which
-create pre-defined useful types of relationships. Look there first
-before using this method directly.
-
-The relationship name can be arbitrary, but must be unique for each
-relationship attached to this result source. 'related_source' should
-be the name with which the related result source was registered with
-the current schema. For example:
-
- $schema->source('Book')->add_relationship('reviews', 'Review', {
- 'foreign.book_id' => 'self.id',
- });
-
-The condition C<$cond> needs to be an L<SQL::Abstract>-style
-representation of the join between the tables. For example, if you're
-creating a relation from Author to Book,
-
- { 'foreign.author_id' => 'self.id' }
-
-will result in the JOIN clause
-
- author me JOIN book foreign ON foreign.author_id = me.id
-
-You can specify as many foreign => self mappings as necessary.
-
-Valid attributes are as follows:
-
-=over 4
-
-=item join_type
-
-Explicitly specifies the type of join to use in the relationship. Any
-SQL join type is valid, e.g. C<LEFT> or C<RIGHT>. It will be placed in
-the SQL command immediately before C<JOIN>.
-
-=item proxy
-
-An arrayref containing a list of accessors in the foreign class to proxy in
-the main class. If, for example, you do the following:
-
- CD->might_have(liner_notes => 'LinerNotes', undef, {
- proxy => [ qw/notes/ ],
- });
-
-Then, assuming LinerNotes has an accessor named notes, you can do:
-
- my $cd = CD->find(1);
- # set notes -- LinerNotes object is created if it doesn't exist
- $cd->notes('Notes go here');
-
-=item accessor
-
-Specifies the type of accessor that should be created for the
-relationship. Valid values are C<single> (for when there is only a single
-related object), C<multi> (when there can be many), and C<filter> (for
-when there is a single related object, but you also want the relationship
-accessor to double as a column accessor). For C<multi> accessors, an
-add_to_* method is also created, which calls C<create_related> for the
-relationship.
-
-=back
-
-Throws an exception if the condition is improperly supplied, or cannot
-be resolved.
+See L<DBIx::Class::Relationship::Base/add_relationship>
=cut