> Yes, i'd like to do that, but because of the code injection seems > to carry state from the old session, the new session has trouble > with even the copy. then, separate the issues: a) make a working deep copy within same session (this is not at all trivial, except for very simple schemas) b) make a working move-across-session for singular obj and just then combine
> On Sat, 2009-01-17 at 15:23 +0200, a...@svilendobrev.com wrote: > > read various threads about copy/deep-copy. > > in any case u'll have to do the hierarchy-copying yourself - even > > if moving one object (alone) from session to session succeeds > > somehow. > > > > On Saturday 17 January 2009 14:47:41 Darren Govoni wrote: > > > 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 -~----------~----~----~----~------~----~------~--~---