I am getting this error on a session.flush().

    sqlalchemy.orm.exc.ConcurrentModificationError: Updated rowcount 0 does
not match number of objects updated 1

and can't figure out where to start looking.

The database is sqlite, there are no other users connected to the database,
and only one process running at the time.

This is happening in the middle of a fairly large routine that is copying a
data structure within my database. The routine starts at a high level parent
object and copies the parent and many related children through several
intertwined relationships resulting in a copy of the parent and all related
rows in the database. Think of it as copying object "X" and everything about
"X" to a new object "Y" that will have a copy of all "X" ' s information.
There are about 20 tables involved in the process. Periodically in the
process I need to do a flush() to get the id's of some new objects and it is
in one of  these flush() operations that I get this error.

I'm looking for any help I can get about what could cause the error or what
I should look at to debug it and track down the cause. I am pretty sure it
will be in my code someplace because this is all new code and I am just in
the unit testing stage.


-- 
Mike Conley

--~--~---------~--~----~------------~-------~--~----~
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 
sqlalchemy+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to