--1UWUbFP1cBYEclgG
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Tue, Sep 20, 2005 at 12:38:22PM +0900, Bob Hutchison wrote:

> does Rails really not have application level transactions? By
> application level transactions I understand that to mean that if the
> application pulls a bunch of objects in from the database, modifies
> some of them, then Rails can guarantee that all of the changed
> objects have been written successfully or not at all to the db. If
> Rails cannot do this, then there is a class of applications that
> Rails cannot support. I find this difficult to believe.

Rails can certainly do simple transactions.  You just pass a block to
the 'transaction' method and all database writes within it will be
within a single transaction.

What may be more difficult is maintaining a single transaction across
multiple http requests.  I think you'd need to store the modified
objects within the session until you were ready to do one big commit
to the database.

--1UWUbFP1cBYEclgG
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFDL4k3nhUz11p9MSARAolYAKDapIxt7JuoGbGpCKbY3a0aFFUaFQCdFBHV
frZE64O3V4CBx7dXVUrYv30
fY -----END PGP SIGNATURE----- --1UWUbFP1cBYEclgG--