[Bast-commits] r7856 - in DBIx-Class/0.08/trunk: . lib/DBIx/Class t
frew at dev.catalyst.perl.org
frew at dev.catalyst.perl.org
Wed Nov 11 22:50:44 GMT 2009
Author: frew
Date: 2009-11-11 22:50:43 +0000 (Wed, 11 Nov 2009)
New Revision: 7856
Modified:
DBIx-Class/0.08/trunk/Changes
DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm
DBIx-Class/0.08/trunk/t/100populate.t
Log:
RT50828
Modified: DBIx-Class/0.08/trunk/Changes
===================================================================
--- DBIx-Class/0.08/trunk/Changes 2009-11-11 20:56:37 UTC (rev 7855)
+++ DBIx-Class/0.08/trunk/Changes 2009-11-11 22:50:43 UTC (rev 7856)
@@ -1,5 +1,7 @@
Revision history for DBIx::Class
+ - Fix populate with has_many bug
+ (RT #50828)
- Fix Oracle autoincrement broken for Resultsets with scalar refs
(RT #50874)
- Complete Sybase RDBMS support including:
Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm 2009-11-11 20:56:37 UTC (rev 7855)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm 2009-11-11 22:50:43 UTC (rev 7856)
@@ -1850,7 +1850,7 @@
foreach my $rel (@rels) {
next unless $item->{$rel} && ref $item->{$rel} eq "ARRAY";
- my $parent = $self->find(map {{$_=>$item->{$_}} } @pks)
+ my $parent = $self->find({map { $_ => $item->{$_} } @pks})
|| $self->throw_exception('Cannot find the relating object.');
my $child = $parent->$rel;
Modified: DBIx-Class/0.08/trunk/t/100populate.t
===================================================================
--- DBIx-Class/0.08/trunk/t/100populate.t 2009-11-11 20:56:37 UTC (rev 7855)
+++ DBIx-Class/0.08/trunk/t/100populate.t 2009-11-11 22:50:43 UTC (rev 7856)
@@ -296,4 +296,24 @@
ok ($row, "Stringification test row '$_' properly inserted");
}
+lives_ok {
+ $schema->resultset('TwoKeys')->populate([{
+ artist => 1,
+ cd => 5,
+ fourkeys_to_twokeys => [{
+ f_foo => 1,
+ f_bar => 1,
+ f_hello => 1,
+ f_goodbye => 1,
+ autopilot => 'a',
+ },{
+ f_foo => 2,
+ f_bar => 2,
+ f_hello => 2,
+ f_goodbye => 2,
+ autopilot => 'b',
+ }]
+ }])
+} 'fix RT50828';
+
done_testing;
More information about the Bast-commits
mailing list