Revision history for DBIx::Class
0.06002
+ - fix to copy() with non-composed resultsource
- fix to ->search without args to clone rs but maintain cache
- grab $self->dbh once per function in Storage::DBI
- nuke ResultSource caching of ->resultset for consistency reasons
if $self->result_source->column_info($col)->{is_auto_increment};
}
my $new = bless { _column_data => $col_data }, ref $self;
+ $new->result_source($self->result_source);
$new->set_columns($changes);
$new->insert;
foreach my $rel ($self->result_source->relationships) {
plan tests => 4;
my $artist = $schema->resultset('Artist')->find(1);
my $artist_cds = $artist->search_related('cds');
-my $cover_band = $artist->copy;
+
+my $cover_band;
+
+{
+ no warnings 'redefine';
+ local *DBICTest::Artist::result_source_instance = \&DBICTest::Schema::Artist::result_source_instance;
+
+ $cover_band = $artist->copy;
+}
+
my $cover_cds = $cover_band->search_related('cds');
cmp_ok($cover_band->id, '!=', $artist->id, 'ok got new column id...');
is($cover_cds->count, $artist_cds->count, 'duplicated rows count ok');