[Sqlalchemy-tickets] Issue #3695: update error using vertica-python (zzzeek/sqlalchemy)
Brought to you by:
zzzeek
From: aCLr <iss...@bi...> - 2016-04-22 13:42:36
|
New issue 3695: update error using vertica-python https://bitbucket.org/zzzeek/sqlalchemy/issues/3695/update-error-using-vertica-python aCLr: Hi. I use your library (1.0.12) with vertica_python adapter(0.5.5) and get that situation: ``` #!sql 2016-04-22 16:26:24,691 INFO sqlalchemy.engine.base.Engine UPDATE orders SET comment=:comment, ts_last_activity=:ts_last_activity, state=:state, previous_state=:previous_state, flags=:flags WHERE orders.id = :orders_id 2016-04-22 16:26:24,691 INFO sqlalchemy.engine.base.Engine {'comment': '"last_activity"=>"2016-04-22 13:26"', 'orders_id': 2000205, 'previous_state': 500, 'state': 300, 'flags': 2048, 'ts_last_activity': 1461320780} 2016-04-22 16:26:24,790 INFO sqlalchemy.engine.base.Engine ROLLBACK StaleDataError: UPDATE statement on table 'orders' expected to update 1 row(s); -1 were matched. ``` Here I'm checking the session state: ``` #!python >>> SessionVertica.identity_map <sqlalchemy.orm.identity.WeakInstanceDict object at 0x7f43c5e46f90> >>> SessionVertica.identity_map.check_modified() True >>> SessionVertica.identity_map.keys() [(<class 'hasoffers.core.model.order.S'>, (2000205,))] >>> recounted_base.id 2000205 ``` As you see, I have rows for update, but i get the error above. Do you have any idea, what does it means? |