Michael Higgins wrote: > 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. '-) >
No changes were introduced between 08010 and 08012, ergo the code in Storage::DBI can not be blamed. On an unrelated note there is a planned effort to clean up this chunk of code (now that SQLA has a direction), however it will take some time. _______________________________________________ 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]
