fixed bug where class_resolver was mistakenly clobbered in compose_connection
[dbsrgits/DBIx-Class-Historic.git] / lib / DBIx / Class / Relationship.pm
index d7d1675..dce0036 100644 (file)
@@ -29,10 +29,53 @@ This class handles relationships between the tables in your database
 model. It allows your to set up relationships, and to perform joins
 on searches.
 
+This POD details only the convenience methods for setting up standard
+relationship types. For more information see ::Relationship::Base
+
 =head1 METHODS
 
+All convenience methods take a signature of the following format -
+
+  __PACKAGE__>method_name('relname', 'Foreign::Class', $join?, $attrs?);
+
+
+
 =over 4
 
+=item has_one
+
+  my $f_obj = $obj->relname;
+
+Creates a one-one relationship with another class; defaults to PK-PK for
+the join condition unless a condition is specified.
+
+=item might_have
+
+  my $f_obj = $obj->relname;
+
+Creates an optional one-one relationship with another class; defaults to PK-PK
+for the join condition unless a condition is specified.
+
+=item has_many
+
+  my @f_obj = $obj->relname($cond?, $attrs?);
+  my $f_result_set = $obj->relname($cond?, $attrs?);
+
+  $obj->add_to_relname(\%col_data);
+
+Creates a one-many relationship with another class; 
+
+=item belongs_to
+
+  my $f_obj = $obj->relname;
+
+  $obj->relname($new_f_obj);
+
+Creates a relationship where we store the foreign class' PK; if $join is a
+column name instead of a condition that is assumed to be the FK, if not
+has_many assumes the FK is the relname is that is a column on the current
+class.
+
 =cut
 
 1;