better explanation for optional fk values in rels (3rd try)
David Schmidt [Mon, 30 Dec 2013 08:52:48 +0000 (09:52 +0100)]
lib/DBIx/Class/Relationship.pm

index 979630f..634b966 100644 (file)
@@ -191,11 +191,8 @@ more info see L<DBIx::Class::Relationship::Base/condition>.
   # To retrieve the plain id if you used the ugly version:
   $book->get_column('author_id');
 
-If the column containing the foreign key of a relationship
-is nullable, the belongs_to relationship still does the
-right thing. (i.e. C<< $obj->author >> would return C<undef>).
-However you probably want to set the
-L<join_type|DBIx::Class::Relationship::Base/join_type> attribute so that
+If the foreign key column is nullable you probably want to set
+the L<join_type|DBIx::Class::Relationship::Base/join_type> attribute so that
 a C<LEFT JOIN> is done. This ensures that relationship traversal works
 consistently in all situations. (i.e. resultsets involving C<join> or
 C<prefetch> operations). The modified declaration is shown below: