* Nilson Santos Figueiredo Junior <[EMAIL PROTECTED]> [2006-07-19 08:25]:
> Attached you'll find a patch for
> DBIx::Class::Schema::Loader::Base which maintains the column
> ordering as it was found on the database when dumping the
> schema.

I see your patch and raise you this one.

Regards,
-- 
#Aristotle
*AUTOLOAD=*_;sub _{s/(.*)::(.*)/print$2,(",$\/"," ")[defined wantarray]/e;$1};
&Just->another->Perl->hacker;
Index: Base.pm
===================================================================
--- Base.pm     (revision 2211)
+++ Base.pm     (working copy)
@@ -493,11 +493,8 @@
             $self->_dbic_stmt($table_class,'add_columns',@$cols);
         }
         else {
-            my %cols_hash;
-            foreach my $col (@$cols) {
-                $cols_hash{$col} = \%{($col_info->{$col})};
-            }
-            $self->_dbic_stmt($table_class,'add_columns',%cols_hash);
+            my @cols_array = map { $_, \%{($col_info->{$_})} } @$cols;
+            $self->_dbic_stmt($table_class,'add_columns', @cols_array);
         }
 
         my $pks = $self->_table_pk_info($table) || [];
_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/

Reply via email to