[Dbix-class] SQL::Abstract inequality warning

Duncan Garland duncan.garland at motortrak.com
Fri Dec 12 17:01:38 GMT 2014


Can somebody explain why I've started to get this warning when I run the
statement below.

As far as I can see, I'm doing exactly as asked, and the code works so it
doesn't evaluate to 1=1.

SQL::Abstract::belch(): [SQL::Abstract::_where_field_op_ARRAYREF] Warning:
A multi-element arrayref as an argument to the inequality op '!=' is
technically equivalent to an always-true 1=1 (you probably wanted to say
...{ $inequality_op => [ -and => @values ] }... instead)

  my @service_contracts = $c->model('DB::Mbfl2ServiceContract')->search(
    { vehicle_id => $vehicle_id,
      deleted_yn => 'N',
      status     => { '!=' => [ '-and' => [ 'T', 'X', 'E' ] ] }
    { order_by => { '-desc' => 'date_updated' } }



The information contained in this message is for the intended addressee 
only and may contain confidential and/or privileged information. If you are 
not the intended addressee, please delete this message and notify the 
sender; do not copy or distribute this message or disclose its contents to 
anyone. Any views or opinions expressed in this message are those of the 
author and do not necessarily represent those of Motortrak Limited or of 
any of its associated companies. No reliance may be placed on this message 
without written confirmation from an authorised representative of the 

Registered in England 3098391 V.A.T. Registered No. 667463890
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20141212/6e692f6a/attachment.htm>

More information about the DBIx-Class mailing list