X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fprefetch%2Fjoin_type.t;fp=t%2Fprefetch%2Fjoin_type.t;h=e58af4f9a6232b418f6551d604447401fc26726f;hb=459669a408682896779b908bc29d6264af8702e3;hp=817b3b0557b3bf21a7b34d051a2d1d2bfe40a020;hpb=7cd98754bc5a7287b44cc9638420bd03392e41cb;p=dbsrgits%2FDBIx-Class.git diff --git a/t/prefetch/join_type.t b/t/prefetch/join_type.t index 817b3b0..e58af4f 100644 --- a/t/prefetch/join_type.t +++ b/t/prefetch/join_type.t @@ -20,11 +20,16 @@ my $nulls = { # make sure null-prefetches do not screw with the final sql: for my $type (keys %$nulls) { -# is_same_sql_bind ( -# $cds->search({}, { prefetch => { artist => $nulls->{$type} } })->as_query, -# $cds->as_query, -# "same sql with null $type prefetch" -# ); + is_same_sql_bind ( + $cds->search({}, { prefetch => { artist => $nulls->{$type} } })->as_query, + '( SELECT me.cdid, me.artist, me.title, me.year, me.genreid, me.single_track, + artist.artistid, artist.name, artist.rank, artist.charfield + FROM cd me + JOIN artist artist + ON artist.artistid = me.artist + )', [], + "same sql with null $type prefetch" + ); } # make sure left join is carried only starting from the first has_many