Skip Menu |

This queue is for tickets about the DBIx-Class CPAN distribution.

Report information
The Basics
Id: 63086
Status: resolved
Priority: 0/
Queue: DBIx-Class

People
Owner: Nobody in particular
Requestors: MAROS [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.08124
Fixed in: 0.08191



Subject: Resultset update with -or
Updating a resulset that contains an -or query does not work. See attached test case for details. Cheers Maroš
Subject: update_or.t
use strict; use warnings; use Test::More; use Test::Exception; use lib qw(t/lib); use DBIC::SqlMakerTest; use DBICTest; my $schema = DBICTest->init_schema(); my $cd_rs = $schema->resultset ('CD'); my $cd = $cd_rs->create({ title => 'Songs from the future', year => 2050, artist => $schema->resultset('Artist')->first, }); # make sure order + distinct do not double-inject group criteria my $year_rs = $cd_rs->search ({ -or => [ year => { '>=', 2020 }, year => { '<=', 1940 }, ] }); $year_rs->update({ year => 2010 }); $cd->discard_changes(); is($cd->year,2010); $cd->delete; done_testing;
Issue is mostly solved by http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=dbsrgits/DBIx-Class.git;a=commitdiff;h=a4e873ac1528a3a53d95fc11ab49d248096c5c6c, but is not ready for prime time as it relies on 64205 being resolved. Stalling until then.
This ended up being fixed in a completely different maner (ugly dirty and effective). Fix included in 0.08191