On Thu, 19 Mar 2009 15:04:05 +0000
Anthony Gladdish <[email protected]> wrote:

> Hi,
> 
> Upgrading from:
> 
> DBIC v0.08010 
> SQL:Abstract v1.24 
> 
> to:
> 
> DBIC v0.08012 
> SQL:Abstract v1.5

Big changes.

[...]

> I'm expecting:
> 
> WHERE ( ( ( module_access.expires > ? OR scheme_access.expires > ? )
> AND me.person = ? ) ): '2009-03-19T14:38:06', '2009-03-19T14:38:06',
> '2'
> 
> ... notice the "AND". This expected SQL was getting generated prior
> to upgrading my libraries.
> 
> >From the DBIC 0.08012 cookbook "Complex WHERE clauses"
> >documentation, it looks like my original search() should work?!
> 
> Placing {} braces around the "-or => []" bit, or doing "-and => {}"
> instead, appears to fix this, but I'm not sure if this is correct or
> not?

[ Hopefully, others will correct me if I'm off-base. ]

I think this is a change that is in a different module. A big chunk of 
SQL:Abstract is overridden in DBIx-Class-Storage-DBI.

package DBIx::Class::Storage::DBI;

[ ... ]

package DBIC::SQL::Abstract; # Would merge upstream, but nate doesn't reply :(
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
use base qw/SQL::Abstract::Limit/;

Changes happen in there, I think. You have discovered the new syntax. Glad it 
works for you. '-)

Cheers,

-- 
 |\  /|        |   |          ~ ~  
 | \/ |        |---|          `|` ?
 |    |ichael  |   |iggins    \^ /
 michael.higgins[at]evolone[dot]org

_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[email protected]

Reply via email to