On Jun 21, 2007, at 4:50 AM, Sanjay wrote:
> > Hi, > > In order to achieve concurrency control using optimistic locking, we > are doing the following: > > 1. Adding a column in the table like this: > > page_tbl = Table('page', metadata, > Column('page_id', Integer, primary_key=True, autoincrement=True), > Column('link_name', Unicode(30), nullable=False), > . > . > Column('version', Integer, default=0)) > > 2. Mapping like this: > > assign_mapper(session.context, Page, page_tbl, > version_id_col=page_tbl.c.version, properties={...........}) > > > But it does not seem working. Are we missing any step? > looks fine to me. the "default=0" shouldnt break it although we dont have that in our unit tests, if you want to try with that removed. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---