[ZODB-Dev] RE: ~ Ape newbie

Adam Groszer adamg at mailbox.hu
Wed Jun 4 18:51:42 EDT 2003


Shane,

I managed somehow a working domain mapper by modifying a copy of the
apelib/zope2 scripts.

Now, if I do

			root = conn1.root()
			get_transaction().begin()

			print root
			app = root['Application']
			print app.get()

			dum = dummy()
			dum.setvalue(33)
			app.setobject('dummy', dum)

			#get_transaction().commit()

			app.setobject('dummy_', dum)
			app.setobject('dummy__', dum)

			get_transaction().commit()

I get the following stack trace:
Traceback (most recent call last):
  File "P:\PMSpy\test\apetest6.py", line 333, in ?
    x.testStoreAndLoad()
  File "P:\PMSpy\test\apetest6.py", line 311, in testStoreAndLoad
    get_transaction().commit()
  File "C:\Python22\lib\site-packages\ZODB\Transaction.py", line 272, in
commit
    ncommitted += self._commit_objects(objects)
  File "C:\Python22\lib\site-packages\ZODB\Transaction.py", line 388, in
_commit
_objects
    jar.commit(o, self)
  File "C:\Python22\lib\site-packages\apelib\zodb3\connection.py", line 267,
in
commit
    raise StorageError('Conflicting OIDs')
ZODB.POSException.StorageError: Conflicting OIDs

Anyway, if I uncomment the get_transaction().commit(), everything works fine
so I can continue on...
If you need the full source, please drop a mail.

Adam




More information about the ZODB-Dev mailing list