[prev in list] [next in list] [prev in thread] [next in thread] 

List:       zope-dev
Subject:    Re: [Zope-dev] [ZODB-Dev] Splitting a large ZODB file storage - any
From:       Hanno Schlichting <hanno () hannosch ! eu>
Date:       2009-12-30 14:02:51
Message-ID: 5cae42b20912300602m1a1623eercd87faa91850e1a8 () mail ! gmail ! com
[Download RAW message or body]

On Wed, Dec 30, 2009 at 9:16 AM, Andreas Jung <lists@zopyx.com> wrote:
> Delete operations will trigger events modifying other global metadata
> related
> to the those objects. So this approach requires modification to the
> application in
> order to avoid such side effects.

But if you do it from a debug prompt, you can easily prevent those
events from being fired.

For a normal ObjectManager you do:

delattr(root, 'A')  # this is what _delOb does
root._objects = tuple([i for i in root._objects if i['id'] != 'A'])

That's the actually important part of _delObject method, without
firing any events or calling any manage_ methods.

Hanno
_______________________________________________
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic