[sqlalchemy] Transfer an object from one session to another

2008-11-22 Thread Hinrich Winther
Hi, How do I something like myObject = session1.query(something).one() session2.add(myObject) without the need to expunge myObject from session1? and another one: How can I compare objects from different sessions to see if they origin from the same row in the db? Regards, Hinrich. --~--~--

[sqlalchemy] Re: import sqlalchemy.sql changes __name__

2008-11-22 Thread Michael Bayer
this is ticket 1215 and is fixed in r5319. On Nov 22, 2008, at 10:24 AM, MikeCo wrote: > > Why does this change __name__? > print __name__ > __main__ from sqlalchemy.sql import * print __name__ > sqlalchemy.sql > > It is often bad practice to import *, but still a module should no

[sqlalchemy] import sqlalchemy.sql changes __name__

2008-11-22 Thread MikeCo
Why does this change __name__? >>> print __name__ __main__ >>> from sqlalchemy.sql import * >>> print __name__ sqlalchemy.sql It is often bad practice to import *, but still a module should not impact __name__ unless really necessary. Primary side effect is you can no longer use if __name__ ==

[sqlalchemy] OT: Travel Blog

2008-11-22 Thread Paul Johnston
Hi all, Well, I finally set off on my travels, and it's turned out to be more than I ever dreamed of. If you're interested, I'm keeping a blog here: http://paj28.livejournal.com/ Hope everything's going well with SA. All the best, Paul --~--~-~--~~~---~--~~ You r