[Zope] exchanging ids in a single transaction
Jerome Alet
alet@unice.fr
Tue, 23 Jan 2001 12:21:46 +0100 (MET)
Hi,
I'm currently thinking about a project in which I'd want to be able to
exchange 2 objects ids.
My plan is to save the first one's id
then rename the first one with the second's id
then rename the second with the first's id
which is very classical.
I've got no code yet, but I want to know if there's a method to do all
this in a single transaction: if any error occur then I don't want any id
to be changed
Is it possible and How ?
Should I use the UNDO machinery to do that or is it possible with another
way ?
When I rename an object will my Data.fs grow (some objects may be 5 MBytes
large, but rarely) ?
Any tip will be appreciated.
Jerome Alet - alet@unice.fr - http://cortex.unice.fr/~jerome
Fac de Medecine de Nice http://wwwmed.unice.fr
Tel: (+33) 4 93 37 76 30 Fax: (+33) 4 93 53 15 15
28 Avenue de Valombrose - 06107 NICE Cedex 2 - FRANCE