From: carl :: allgigs.com <carl@al...> - 2004-09-28 15:14:07
I'm new both to Python and Webware, so please excuse my ignorance if it's an
obvious answer! I'm using the latest CVS version of Webware, if that has
I have two classes defined in my Classes.csv (Some fields removed for
Now, I can very easily retrieve a person using the fetchObjectsOfClass.
That all works fine. I have a isDeveloper method in Person, and is
currently defined as :
def isDeveloper( self ):
devResults = store.fetchObjectsOfClass( Developer )
for developer in devResults:
if developer.Person() == self:
It seems to me to be very inefficient to get all Developers, and see which
one matches the Person I'm testing for. I'm sure I'm missing something, and
any pointers to a more efficient solution would be gratefully received!