On 25/08/2010 17:15, Michael Bayer wrote:
On Aug 25, 2010, at 10:50 AM, Raf Geens wrote:

Hi,

I have a sqlite database A and a MySQL database B which share the same
schema, where I want to synchronize the contents of certain tables in
A with those in B at certain times. Except for the synchronizing step
the contents on A's side don't change, while those on B's side might.

I'm trying to do this using Session.merge, which works if the row
doesn't exist yet in A, or does but hasn't changed in B. If it has
changed in B, I get a ConcurrentModificationError when the merge is
flushed.
can't reproduce in 0.5.6 nor in 0.6.3, so a full test script that reproduces 
will be needed.  Alternatively, you might want to look at your SQL output and 
see what primary key is attempting to be updated:

Thanks for the quick reply. I've looked at the SQL output of the last commit and it appears to match on the correct primary key. However, the Individual has a version_id_col defined in the mapper, and it's trying to match on the wrong value there, which seems to cause the update to fail. I'll try to reproduce it in a full script.

Raf

--
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to