On Friday 29 July 2005 23:14, Brian Lin wrote:> How are object level transaction different from normal transactions??
> Is there more or less protection in either case?
Object-level transactions work purely in Ruby, the database is not
involved. It''s a while since I looked into it, but I think at the
beginning of a transaction block, a snapshot is taken of the objects
given as arguments. In case the transaction is rolled back, these
objects are restored from the snapshots.
Whether this is more or less protection than db transactions I can''t
say. It depends on what you want. In the case of db-only transactions,
your Ruby objects may have changed in the transaction block and stay
that way after the block, even though the transaction was rolled back.
Michael
--
Michael Schuerig This is not a false alarm
mailto:michael-q5aiKMLteq4b1SvskN2V4Q@public.gmane.org
This is not a test
http://www.schuerig.de/michael/ --Rush, Red Tide