On Wed, Jul 30, 2014 at 3:30 AM, Mike Bernson <m...@mlb.org> wrote: > I have started moving my code base from 0.7.10 to 0.8.7 as first step to > getting > to current version. (There code changes for me to get to 0.9.x where there > are > no code changes to run under 0.8.x) > > I have found a problem with a query that worked on 0.7.10 and now fails > with a raise. > > The code is failing in unit test which means the database is sqllite. > > The klass is mapped class of table table_prl_paid_time_off. > > earlist_predecessor: datetime.date(2012, 8, 16) > last: datetime.date(2013, 4, 30) > account: 151 > > > Query: > query = query.filter( > and_(klass.account == account, > earliest_predecessor <= klass.start_date <= last) > ).order_by('start_date') >
Does it work if you rewrite that as: query = query.filter( and_(klass.account == account, earliest_predecessor <= klass.start_date, klass.start_date <= last) ).order_by('start_date') Simon -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.