[Bast-commits] r5244 - in DBIx-Class/0.08/branches/belongs_to_null_col_fix: . lib/DBIx/Class/Relationship

groditi at dev.catalyst.perl.org groditi at dev.catalyst.perl.org
Tue Dec 16 22:52:12 GMT 2008


Author: groditi
Date: 2008-12-16 22:52:12 +0000 (Tue, 16 Dec 2008)
New Revision: 5244

Modified:
   DBIx-Class/0.08/branches/belongs_to_null_col_fix/Changes
   DBIx-Class/0.08/branches/belongs_to_null_col_fix/lib/DBIx/Class/Relationship/Accessor.pm
Log:
minor typo and style change

Modified: DBIx-Class/0.08/branches/belongs_to_null_col_fix/Changes
===================================================================
--- DBIx-Class/0.08/branches/belongs_to_null_col_fix/Changes	2008-12-16 22:42:10 UTC (rev 5243)
+++ DBIx-Class/0.08/branches/belongs_to_null_col_fix/Changes	2008-12-16 22:52:12 UTC (rev 5244)
@@ -3,7 +3,7 @@
         - Classes submitted as result_class for a resultsource are now
           automatically loaded via ensure_loaded()
         - 'result_class' resultset attribute, identical to result_class()
-        - add 'null_on_fk' option for relationship accessors of type 'single'. 
+        - add 'undef_on_null_fk' option for relationship accessors of type 'single'. 
           This will prevent DBIC from querying the database if one or more of
           the key columns IS NULL. Tests + docs (groditi)
            - for 'belongs_to' rels, 'null_on_fk' defaults to true.

Modified: DBIx-Class/0.08/branches/belongs_to_null_col_fix/lib/DBIx/Class/Relationship/Accessor.pm
===================================================================
--- DBIx-Class/0.08/branches/belongs_to_null_col_fix/lib/DBIx/Class/Relationship/Accessor.pm	2008-12-16 22:42:10 UTC (rev 5243)
+++ DBIx-Class/0.08/branches/belongs_to_null_col_fix/lib/DBIx/Class/Relationship/Accessor.pm	2008-12-16 22:52:12 UTC (rev 5244)
@@ -30,8 +30,7 @@
         my $cond = $self->result_source->resolve_condition(
           $rel_info->{cond}, $rel, $self
         );
-        if( exists $rel_info->{attrs}->{undef_on_null_fk}
-              && $rel_info->{attrs}->{undef_on_null_fk} ){
+        if ($rel_info->{attrs}->{undef_on_null_fk}){
           return if grep { not defined } values %$cond;
         }
         my $val = $self->find_related($rel, {}, {});




More information about the Bast-commits mailing list