[Zope] ZCatalog problems

Jan Lentfer Jan@MountainbikeHQ.de
Thu, 21 Jun 2001 13:48:52 +0200


> Hi,
>
> I am having problems with getting back data from ZCatalog.
>
> I create instances of the ZClass "racedate". racedate has a property
called
> "date_sort" which is the date that the race will take place in the format
> "yyyymmdd".
> In a dtml-document I read the objects with
>
> <dtml-with "admin.racedates">
>          <dtml-in "Catalog(sort_on='date_sort)">
>                <dtml-var date_sort>
> [...]
>
> Everything works fine until two or more objects have the same value in
> date_sort (eg. 20010528). Then it miserably fails. Only part of the
objects
> or even none are displayed. I tried back and forth and it really seems to
> be the sort_on='date_sort'. If I do sort_on='id', all objects are
displayed
> and <dtml-var date_sort> shows the right values.
> So the problem really seems to be the sorting on an index when 2 or more
> objects have the same value for that property.
> Is that a bug or a feature?
>
> Jan
>
> PS: Using Zope 2.3.2 src, Phyton 1.5.2, SuSE 7.1


I worked a little on this again it really is like that: If you do a dtml-in
"Catalog(sort_on='property')"> where more than 1 objects have the same value
for this property, the dtml-in fails.
I bypassed this by adding a unique number (as described in the "Searchable
Job Board" How-To) to the string I want to do seaching on.

Again my question is: Is this behaviour *normal*. Should a do something
basically different or is this a bug in the ZCatalog in Zope 2.3.2

Jan