Commit | Line | Data |
ff1393c7 |
1 | use strict; |
2 | use warnings; |
3 | |
ff1393c7 |
4 | use Test::More; |
5 | |
ff1393c7 |
6 | use lib qw(t/lib); |
7 | use DBICTest; |
ff1393c7 |
8 | |
9 | my $schema = DBICTest->init_schema(); |
10 | |
11 | { |
12 | my $rs = $schema->resultset("CD")->search( |
13 | { 'artist.name' => 'Caterwauler McCrae' }, |
14 | { join => [qw/artist/]} |
15 | ); |
16 | my $squery = $rs->get_column('cdid')->as_query; |
17 | my $subsel_rs = $schema->resultset("CD")->search( { cdid => { IN => $squery } } ); |
18 | is($subsel_rs->count, $rs->count, 'Subselect on PK got the same row count'); |
19 | } |
f54428ab |
20 | |
21 | done_testing; |