[Z3-sqlos] obj.destroySelf() broken in sqlos
Sidnei da Silva
sidnei at awkly.org
Sun Oct 24 00:27:31 CEST 2004
On Sun, Oct 24, 2004 at 12:17:28AM +0200, Andrew Bennetts wrote:
| Attached is a test case for the bug (I've locally placed it in
| tests/test_delete.py, but it probably doesn't care).
|
| It's somewhat fragile due to using SamplePerson.createTable, so I haven't
| checked it in yet.
|
| And it turns out that current sqlos in SVN has already fixed the bug,
| because calling syncUpdate on a destroySelf'd object is safe (although
| that's probably an accident of implementation; Ian Bicking says on
| sqlobject-discuss that nothing should be relied on after destroySelf is
| called).
Right. It's about time to start doing something about delete
*wink*. So, my suggestion is to publish a ObjectDeleted event and
remove the object from the list of objects registerd with the
transaction on a subscriber.
| The test does fail with the version of sqlos I'm currently developing
| against. Time to upgrade! :)
|
| Ideas on improving the test so that we can commit it and slowly start
| expanding the test suite are welcome :)
|
| On the topic of the tests: ftests/test_transaction.py fails for me with:
| IOError: [Errno 2] No such file or directory:
| '/home/andrew/code/sqlos/ftesting.zcml'
|
| Is there a file missing from SVN?
Uhm. Not that I know of. In fact, I can't find anything referencing
that file by grepping.
--
Sidnei da Silva <sidnei at awkly.org>
http://awkly.org - dreamcatching :: making your dreams come true
http://www.enfoldsystems.com
http://plone.org/about/team#dreamcatcher
Do not use the blue keys on this terminal.
More information about the z3-sqlos
mailing list