I am trying to find the most efficient way to keep two databases in sync. There are multiple tables in the database and each row has a "dirty" flag if something has changed since the last sync. I am pickling session objects and passing them back and forth to applications that are managing each of the databases. While it is working, I have code like:
for col_name in [col.name for col in klass.c]: setattr(db1_row_obj, col_name, getattr(db2_row_obj, col_name)) As you can see, I am just setting each column in an row needing updating to the value of each column in the "changed" row. My question is whether there is some way to just force SA to update every column in a table row from a session query row object. Since the row object containing the updates will be an unpickled object from another database that was merged into the current session, it will look like nothing in that row object has changed but I want to force a database update and have the updated row overwrite everything in that row in the database. There is a uuid that allows the rows to be matched. Thanks for any help. ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Sqlalchemy-users mailing list Sqlalchemy-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users