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; |
8 | use DBIC::SqlMakerTest; |
9 | |
10 | my $schema = DBICTest->init_schema(); |
11 | |
12 | { |
13 | my $rs = $schema->resultset("CD")->search( |
14 | { 'artist.name' => 'Caterwauler McCrae' }, |
15 | { join => [qw/artist/]} |
16 | ); |
17 | my $squery = $rs->get_column('cdid')->as_query; |
18 | my $subsel_rs = $schema->resultset("CD")->search( { cdid => { IN => $squery } } ); |
19 | is($subsel_rs->count, $rs->count, 'Subselect on PK got the same row count'); |
20 | } |
f54428ab |
21 | |
22 | done_testing; |