Hello Marius,<br><br>thank you so much for your quick answer! I&#39;ll give it a try implementing these methods and will get back to you with the result. <br>But anyway, the Chatroom class is inheriting from Persistent, I thought this base class provided some basic comparison methods...<br>
<br><div class="gmail_quote">2010/9/23 Marius Gedminas <span dir="ltr">&lt;<a href="mailto:marius@gedmin.as">marius@gedmin.as</a>&gt;</span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
It sounds as if your Chatroom class doesn&#39;t implement comparison<br>
operators (__lt__ and friends) correctly.<br>
<br>
If you want to store objects in an OOTreeSet, those objects must<br>
have a well-defined ordering that doesn&#39;t change when the objects are<br>
loaded back from the ZODB and end up at a different memory address.  The<br>
default comparison provided by Python doesn&#39;t cut it.<br>
<br>
So: does your Chatroom define __cmp__ or __lt__, __le__, __gt__, __ge__,<br>
__eq__, __ne__ methods?<br>
<br>
Marius Gedminas<br>
<font color="#888888">--<br>
Writing setattr hooks properly is a black art. Writing persistent<br>
setattr hooks is more like hearding bees blindfolded...<br>
        -- Casey Duncan<br>
</font><br>-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v1.4.10 (GNU/Linux)<br>
<br>
iEYEARECAAYFAkybjnEACgkQkVdEXeem148NFQCfS2OOWnFqE+T84UPy9gmR4Pj1<br>
VmoAmwXK5YQWO5Arku2Q3NMRyyBFygUg<br>
=vuUn<br>
-----END PGP SIGNATURE-----<br>
<br>_______________________________________________<br>
For more information about ZODB, see the ZODB Wiki:<br>
<a href="http://www.zope.org/Wikis/ZODB/" target="_blank">http://www.zope.org/Wikis/ZODB/</a><br>
<br>
ZODB-Dev mailing list  -  <a href="mailto:ZODB-Dev@zope.org">ZODB-Dev@zope.org</a><br>
<a href="https://mail.zope.org/mailman/listinfo/zodb-dev" target="_blank">https://mail.zope.org/mailman/listinfo/zodb-dev</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>César Muñoz<br><br>CERN<br>IT-UDS-AVC-Indico<br>Bd. 513, R-042<br>Tel.: +41 22 76 77159<br>