Thanks Martin,<br><br>I was talking about waking up a few objects to less than 100 objects from zodb, <br>so getObject() method may be the right choice.<br><br>I considered using IZCatalogBrain, but as you mentioned, brains don&#39;t give underlying object&#39;s implementation, so I rejected to use this in my use case.<br>
<br>Thanks,<br><br>Taito<br><br><br><div class="gmail_quote">On Thu, Jun 18, 2009 at 9:27 PM, Martin Aspeli <span dir="ltr">&lt;<a href="mailto:optilude%2Blists@gmail.com">optilude+lists@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">Taito Horiuchi wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi All,<br>
<br>
Can somebody tell me what is the best practice to adapts adapters to cataloged objects?<br>
<br>
For example, I have ATDocument cataloged as Products.ZCatalog.Catalog.mybrains object.<br>
<br>
I have adapter MyAdapter which adapts ATDocument and provide IMyAdapter.<br>
<br>
To Adapt this cataloged object, I need to wake it up by using getObject() method like:<br>
<br>
IMyAdapter(cataloged_object.getObject())<br>
<br>
Waking up object from zodb is not good practice so, I wonder how you guys do this better.<br>
</blockquote>
<br></div>
... and I forgot to add: you can always use a different adapter that adapts IZCatalogBrain or whatever it is (see the ZCatalog code) and provides your interface. This then needs to be able to do all its work with the information on the catalog brain (or wake up the object).<br>

<br>
However, you can&#39;t get a *different* adapter depending on what the underlying object was when it was cataloged. All brains are created equal.<div><div></div><div class="h5"><br>
<br>
Martin<br>
<br>
-- <br>
Author of `Professional Plone Development`, a book for developers who<br>
want to work with Plone. See <a href="http://martinaspeli.net/plone-book" target="_blank">http://martinaspeli.net/plone-book</a><br>
<br>
<br>
_______________________________________________<br>
Product-Developers mailing list<br>
<a href="mailto:Product-Developers@lists.plone.org" target="_blank">Product-Developers@lists.plone.org</a><br>
<a href="http://lists.plone.org/mailman/listinfo/product-developers" target="_blank">http://lists.plone.org/mailman/listinfo/product-developers</a><br>
</div></div></blockquote></div><br>