[Zope-dev] range:max, date times and pluggableindexes

Andreas Jung Andreas Jung" <andreas@zope.com
Thu, 2 May 2002 11:07:14 -0400


----- Original Message -----
From: "Lennart Regebro" <lennart@torped.se>
To: <zope-dev@zope.org>
Sent: Thursday, May 02, 2002 10:48
Subject: [Zope-dev] range:max, date times and pluggableindexes


> 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.

Smells like a bug. Maybe try to use record-style parameters instead the
usage of old-style parameters (described in the Zope Book). If you can
provide a short testcase, please file a collector issue.

-aj