After some further experimenting with this, it seems I cannot take a mapped object I retrieved from one session and save it in another.
Using expunge then adding the object to a second session on a different database does not work. I thought maybe it would. This is a really useful thing to do, especially for replication at the object layer. So is it true that this cannot currently be done with sqlalchemy? I have been reading the docs, but no clues yet. On Fri, 2009-01-16 at 16:53 -0500, Darren Govoni wrote: > Hi, > I have an object (with references) I get from a session on database A > and I want to copy it (deep copy) to database B. I tried expunging it > from the first session and adding it to the second. What's the best > practice to do this? > > thanks! > Darren > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---