Subject: | [PATCH] Consider that views may exist |
Test/Fixture/DBIC/Schema tries to write access tables in _delete_all().
Since views ("DBIx::Class::ResultSource::View") may exist this should
only be tried for real tables.
The attached patch does this.
Feel free to point me to a repository and
give me co-maint if you are short on time.
Thanks.
Kind regards,
Steffen
--
Steffen Schwigon <ss5@renormalist.net>
Dresden Perl Mongers <http://dresden-pm.org/>
Deutscher Perl-Workshop <http://www.perl-workshop.de/>
Subject: | fixture_views.patch |
--- Test/Fixture/DBIC/Schema.pm.orig 2010-01-19 11:26:58.000000000 +0100
+++ Test/Fixture/DBIC/Schema.pm 2010-01-19 11:27:02.000000000 +0100
@@ -63,7 +63,9 @@
sub _delete_all {
my $schema = shift;
- $schema->resultset($_)->delete for $schema->sources;
+ $schema->resultset($_)->delete for
+ grep { $schema->source_registrations->{$_}->isa('DBIx::Class::ResultSource::Table') }
+ $schema->sources;
}
sub _insert {