X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fresultset%2Fupdate_delete.t;h=539ae64ed5d5af360a81c57d2ce7e1eae3d579cf;hb=471a5fddd105be3f526ab3be978dc74f6b990609;hp=5cd7071b38bce143594d1bb2de8d671d5afde62e;hpb=887d8da0864e028f457ce5c6abaccb2d7160698b;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/t/resultset/update_delete.t b/t/resultset/update_delete.t index 5cd7071..539ae64 100644 --- a/t/resultset/update_delete.t +++ b/t/resultset/update_delete.t @@ -106,6 +106,27 @@ is_deeply ( 'Only two rows incremented (where => scalarref works)', ); +{ + my $rs = $schema->resultset('FourKeys_to_TwoKeys')->search ( + { + -or => [ + { 'me.pilot_sequence' => 12 }, + { 'me.autopilot' => 'b' }, + ], + } + ); + lives_ok { $rs->update({ autopilot => 'z' }) } + 'Update with table name qualifier in -or conditions lives'; + is_deeply ( + [ $tkfks->search ({ pilot_sequence => [12, 22]}) + ->get_column ('autopilot')->all + ], + [qw/z z/], + '... and yields the right data', + ); +} + + $sub_rs->delete; is ($tkfks->count, $tkfk_cnt -= 2, 'Only two rows deleted'); @@ -128,6 +149,9 @@ $schema->resultset('CD')->search( { prefetch => 'liner_notes' }, )->delete; +$schema->storage->debugobj ($orig_debugobj); +$schema->storage->debug ($orig_debug); + is_same_sql_bind ( $sql, \@bind,