1 BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
8 use DBICTest ':DiffSQL';
10 my $schema = DBICTest->init_schema();
12 my $rs = $schema->resultset('CD')->search({}, {
16 count => 'tracks.track_id',
24 SELECT me.cdid, me.artist, me.title, me.year, me.genreid, me.single_track FROM cd me
25 GROUP BY me.cdid, me.artist, me.title, me.year, me.genreid, me.single_track
26 ORDER BY COUNT(tracks.trackid) DESC
30 todo_skip 'order_by using function', 2;
31 is_same_sql($rs->as_query, $match, 'order by with func query');
33 ok($rs->count == 2, 'amount of rows return in order by func query');