[sqlalchemy] Use a scoped_session after close

2013-12-13 Thread
Hi there, I have a long running thread which will sleep for 5min after one step of work. And I use session = scoped_session() / session.query() to do some query. To avoid My sql has gone away, I call session.close() each time before sleep(). Just want to make sure this is a good way to use

[sqlalchemy] Re: Use a scoped_session after close

2013-12-13 Thread
The question basically means can I use session.query() after session.close()? I use pooled connection On Friday, December 13, 2013 10:50:13 AM UTC-8, 史永宏 wrote: Hi there, I have a long running thread which will sleep for 5min after one step of work. And I use session = scoped_session

Re: [sqlalchemy] Polymorphic on another table?

2013-11-27 Thread
This is super! Thanks Michael On Wednesday, November 27, 2013 7:49:23 AM UTC-8, Michael Bayer wrote: On Nov 27, 2013, at 1:23 AM, 史永宏 shoot...@gmail.com javascript: wrote: Hi, Is there a solution for this issue today? Now I have a single table Inheritance in table A, however, the type

Re: [sqlalchemy] Polymorphic on another table?

2013-11-26 Thread
Hi, Is there a solution for this issue today? Now I have a single table Inheritance in table A, however, the type information is stored in another table B linked from A with foreign key... Now if I want to get polymorphic result when querying A, I got error ask me to either use polymorphic or