I have got two problems, which are related:

1. How do get a reference to the root object of the ZODB everywhere?

I mean I have found a solution like something:

            db = zapi.getUtility(IDatabase)
            conn = db.open()
            root = conn.root()
            root['123'] = newbook

But it does not acutally store the object in the database. 
I try to commit it, but


won't work. I search instead for get_transaction(), but I didn't found it in
Python 's lib directory.

So, how do I save it???

2. How do I get (the current) transaction?

Thanks a lot in advance! 

Zope3-users mailing list

Reply via email to