On 7/19/06, A. Pagaltzis <[EMAIL PROTECTED]> wrote:
* 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.
Yes, this code was new in 0.03004, and I'd consider this a regression,
so 0.03005 is going out today to fix it. (And I raise you one that
doesn't copy unneccesarily)
-- Brandon
=== lib/DBIx/Class/Schema/Loader/Base.pm
==================================================================
--- lib/DBIx/Class/Schema/Loader/Base.pm (revision 10759)
+++ lib/DBIx/Class/Schema/Loader/Base.pm (local)
@@ -493,11 +493,11 @@
$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);
+ $self->_dbic_stmt(
+ $table_class,
+ 'add_columns',
+ map { $_, $col_info->{$_} } @$cols
+ );
}
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]/