use warnings FATAL => 'all';
sub retrieve { shift->find(@_) }
-sub retrieve_all { shift->search_literal('1', @_) }
+sub retrieve_all { shift->search }
sub retrieve_from_sql { shift->search_literal(@_) }
-sub count_all { shift->count_literal('1') }
+sub count_all { shift->count }
# Contributed by Numa. No test for this though.
1;
} elsif ($rel_obj->{attrs}{accessor} eq 'filter') {
$new->{_inflated_column}{$pre} = $fetched;
} else {
- $self->{class}->throw("Don't know to to store prefetched $pre");
+ $self->{class}->throw("Don't know how to store prefetched $pre");
}
}
}
BEGIN {
eval "use DBD::SQLite";
- plan $@ ? (skip_all => 'needs DBD::SQLite for testing') : (tests => 95);
+ plan $@ ? (skip_all => 'needs DBD::SQLite for testing') : (tests => 96);
}
INIT {
cmp_ok(@films, '==', 2, "We have 2 films in total");
}
+# EXTRA TEST: added by mst to check a bug found by Numa
+cmp_ok(Film->count_all, '==', 2, "count_all confirms 2 films");
+
my $gone_copy = Film->retrieve('Gone With The Wind');
ok($gone->NumExplodingSheep == 5, 'update()');
ok($gone->Rating eq 'NC-17', 'update() again');