[Zope] ZCatalog: searching for all results that *don't* match
Jean Jordaan
jean@upfrontsystems.co.za
Mon, 10 Dec 2001 17:09:29 +0200
Hi Toby
> If you know all possible status values:
>
> catalog( Status = ['outstanding','cancelled','anything else']
> , meta_type = 'Reminder'
> )
Thanks! Currently, the Status is either 'dismissed' or nothing,
so for me that means::
catalog( Status = ['']
, meta_type = 'Reminder'
)
which works! :) I'd already tried the following, which did not
work::
catalog( Status = ''
, meta_type = 'Reminder'
)
It returns all reminders. One other possibility I'd thought of
is to give the Reminder ZClass an 'isDismissed' method, which
does 'return Status == "dismissed"', and index that. But that
seems rather heavy for something this simple. I'm going with the
'Status = ['']' idiom for now.
Regards,
Jean Jordaan