[Bast-commits] r3798 - in DBIx-Class/0.08/trunk: lib/DBIx/Class t
captainL at dev.catalyst.perl.org
captainL at dev.catalyst.perl.org
Tue Oct 2 16:38:21 GMT 2007
Author: captainL
Date: 2007-10-02 16:38:21 +0100 (Tue, 02 Oct 2007)
New Revision: 3798
Modified:
DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm
DBIx-Class/0.08/trunk/t/66relationship.t
DBIx-Class/0.08/trunk/t/96multi_create.t
Log:
fixed find_or_new_related bug
Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm 2007-09-29 22:37:07 UTC (rev 3797)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm 2007-10-02 15:38:21 UTC (rev 3798)
@@ -1450,8 +1450,8 @@
my $alias = $self->{attrs}{alias};
my $collapsed_cond = $self->{cond} ? $self->_collapse_cond($self->{cond}) : {};
my %new = (
+ %{ $self->_remove_alias($collapsed_cond, $alias) },
%{ $self->_remove_alias($values, $alias) },
- %{ $self->_remove_alias($collapsed_cond, $alias) },
-source_handle => $self->_source_handle,
-result_source => $self->result_source, # DO NOT REMOVE THIS, REQUIRED
);
Modified: DBIx-Class/0.08/trunk/t/66relationship.t
===================================================================
--- DBIx-Class/0.08/trunk/t/66relationship.t 2007-09-29 22:37:07 UTC (rev 3797)
+++ DBIx-Class/0.08/trunk/t/66relationship.t 2007-10-02 15:38:21 UTC (rev 3798)
@@ -122,7 +122,6 @@
is($newartist->name, 'Random Boy Band Two', 'find_or_new_related new artist record with id');
is($newartist->id, 200, 'find_or_new_related new artist id set');
-
SKIP: {
skip "relationship checking needs fixing", 1;
# try to add a bogus relationship using the wrong cols
Modified: DBIx-Class/0.08/trunk/t/96multi_create.t
===================================================================
--- DBIx-Class/0.08/trunk/t/96multi_create.t 2007-09-29 22:37:07 UTC (rev 3797)
+++ DBIx-Class/0.08/trunk/t/96multi_create.t 2007-10-02 15:38:21 UTC (rev 3798)
@@ -173,8 +173,7 @@
my $cd = $schema->resultset("CD")->find(1);
-print $cd->artist->id;
is($cd->artist->id, 1, 'rel okay');
my $new_cd = $schema->resultset("CD")->create($new_cd_hashref);
-is($new_cd->artist->id, 17, 'new id retained okay');
\ No newline at end of file
+is($new_cd->artist->id, 17, 'new id retained okay');
More information about the Bast-commits
mailing list