[Zope-dev] range:max, date times and pluggableindexes
Lennart Regebro
lennart@torped.se
Thu, 2 May 2002 16:48:11 +0200
In Zope 2.3.3 we did this with ZCatalog, on a field index:
query['effective_date'] = ['', DateTime.now()]
query['effective_date_usage'] = 'range:max'
This returns all records where the effective_date is lower than todays date
OR the effective_date is an empty string.
In Zope 2.5.1, the same code now returns *all* records. It seems like now
suddenly comparing dates and an empty string always returns true.
Question 1: Is there a way to solve this without having to do two separate
queries?
Question 2: Is it really true that comparing dates and en empty string
returns true, no matter what? If that is the case (which it seems to be)
then I think it's a bug, unless somebody as very good arguments. :-)
Whaddayousay?