[orm-devel] Simple updates issue in flushUpdates
Mike Watkins
mw@mikewatkins.net
Thu, 21 Nov 2002 08:11:45 -0800
Not positive, but I think some queries or actions (ds.insert(),
ds.delete()) when followed by ds.commit() are not being handled well by
flushUpdates().
Getting close, I think!
Mike
Example traceback follows:
c:\dev\parlez\cms\lib\session.py in
__setitem__(self=<cms.lib.session.SessionMapping instance at 0x0062EA48>,
session_id='5e50d41960c5b248', session=<ParlezSession at 70bba8:
5e50d41960c5b248>)
202 session.user.set_dirty(False)
203 ds.insert(ds_session)
204 ds.commit()
205
206
ds = <orm.adapters.psql.datasource.datasource instance at 0x00640E68>,
ds.commit = <bound method datasource.commit of
<orm.adapters.psql.datasource.datasource instance at 0x00640E68>>
C:\Python22\lib\site-packages\orm\datasource.py in
commit(self=<orm.adapters.psql.datasource.datasource instance at 0x00640E68>)
450 change you really want to happen!
451 """
452 self.flushUpdates()
453 self._conn.commit()
454
self = <orm.adapters.psql.datasource.datasource instance at 0x00640E68>,
self.flushUpdates = <bound method datasource.flushUpdates of
<orm.ad...ql.datasource.datasource instance at 0x00640E68>>
C:\Python22\lib\site-packages\orm\adapters\psql\datasource.py in
flushUpdates(self=<orm.adapters.psql.datasource.datasource instance at
0x00640E68>)
200
201 def flushUpdates(self):
202 dbobj, changes = self._updates
203 pairs = []
204 for a in changes: pairs.append("%s=%s" % a)
dbobj undefined, changes undefined, self =
<orm.adapters.psql.datasource.datasource instance at 0x00640E68>,
self._updates = None