Skip Menu |

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

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

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

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.082842



Subject: SQLA -value arguments degraded on search
SQLA supports binding array literals via the -value "operator". This works as you would expect in DBIC: my $search_on_array = $rs->search({ array_col => { '@>' => { -value => [ 1,2,3 ] } } }) However, if you then chain another search off of that: my $degraded = $search_on_array->search({ id => 9001 }) Then the -value gets degraded into a normal arrayref, and is made into an OR of the array values, which is not what's expected (and breaks horribly on array operators).
On Mon Apr 20 22:07:46 2020, VEESH wrote: Show quoted text
> SQLA supports binding array literals via the -value "operator". This > works as you would expect in DBIC: > my $search_on_array = $rs->search({ array_col => { '@>' => { > -value => [ 1,2,3 ] } } }) > > However, if you then chain another search off of that: > my $degraded = $search_on_array->search({ id => 9001 }) > > Then the -value gets degraded into a normal arrayref, and is made into > an OR of the array values, which is not what's expected (and breaks > horribly on array operators).
Hrm... indeed. I will have to look in couple weeks: End of month deadline for a product approaching.