[Zope] ZCatalog uniqueValuesFor

aZaZel azazel@chiaroscuro.com
Fri, 12 Jan 2001 18:24:34 +0100


Hi,

I have developed a web site for a customer where he add some ZClass 
instances that are zcatalog-aware. Everytime he edits the instances i do 
a reindex_object after the commit of the changes.
I'm using the uniqueValuesFor ()  method do get the values of a field 
index  on some forms but i found a quite strange behaviour. When he adds 
an instance , the value of the  instace's indexed property is added (if 
the value is new)  to the list that uniqueValuesFor 
returns....fine...it's correct . But when he deletes that instance,   
the uniqueValuesFor method still returns that value  even if  it should 
not be on the index. I think there is a problem of  index referesh, but 
i have to do a full reindex to return the right list (e.g. without 
"dead" values). Im using Zope 2.2.0  and the catalog is running with 
subtransaction disabled . I have tried it on Zope 2.2.4 as well with the 
same results. Has anyone a workaround for that problem? I'm doing 
something bad?

please help me!

Alberto