[sqlalchemy] Re: Unit of work and optimistic locking

2007-08-10 Thread Grzegorz Adam Hankiewicz
Michael Bayer wrote: SQLAlchemy has always supported this feature using the version_id_col keyword argument to mapper(), which is described at: http://www.sqlalchemy.org/docs/04/ sqlalchemy_orm.html#docstrings_sqlalchemy.orm_modfunc_mapper Argh, just a little bit too far in the

[sqlalchemy] Re: Unit of work and optimistic locking

2007-08-10 Thread Michael Bayer
On Aug 10, 2007, at 8:32 AM, Grzegorz Adam Hankiewicz wrote: Is there any documentation about this or do sqlalchemy applications deal with concurrent writes in another way? If the unit of work tracked those internal version numbers the flushing would fail and an exception raised, but

[sqlalchemy] Re: Unit of work and optimistic locking

2007-08-10 Thread Michael Bayer
On Aug 10, 1:04 pm, Grzegorz Adam Hankiewicz [EMAIL PROTECTED] wrote: Cool. In the unit test you provide the version_id_col parameter is specified manually. Does SQLAlchemy do automatic reflection on the table and use a version_id column if it already exists, without having to specify it on