[Jifty-commit] r5257 - Jifty-DBI/trunk/lib/Jifty/DBI

Jifty commits jifty-commit at lists.jifty.org
Sat Apr 5 04:23:30 EDT 2008


Author: dpavlin
Date: Sat Apr  5 04:23:29 2008
New Revision: 5257

Modified:
   Jifty-DBI/trunk/lib/Jifty/DBI/Schema.pm

Log:
call _init_hander for all columns

Modified: Jifty-DBI/trunk/lib/Jifty/DBI/Schema.pm
==============================================================================
--- Jifty-DBI/trunk/lib/Jifty/DBI/Schema.pm	(original)
+++ Jifty-DBI/trunk/lib/Jifty/DBI/Schema.pm	Sat Apr  5 04:23:29 2008
@@ -377,12 +377,14 @@
         } else {
             warn "Error in $from: $refclass neither Record nor Collection. Perhaps it couldn't be loaded?";
         }
-    } elsif (my $handler = $column->attributes->{_init_handler}) {
-        $handler->($column, $from);
     } else {
         $column->type('varchar(255)') unless $column->type;
     }
 
+    if (my $handler = $column->attributes->{_init_handler}) {
+        $handler->($column, $from);
+    }
+
     $from->COLUMNS->{$name} = $column;
 
     # Heuristics: If we are called through Jifty::DBI::Schema, 


More information about the Jifty-commit mailing list