Re: [sqlalchemy] eager load polymorphic relation

2013-05-17 Thread Michael Bayer
Is there a reason you can't use subquery eager loading? That will at least use an inner join, but its true when sqla does an auto join from one entity to another, and the other is itself a join, it needs to parenthesize the target. And not every database historically has supported that so at

[sqlalchemy] eager load polymorphic relation

2013-05-17 Thread me
using python 2.7, sqla 0.7.9, postgresql 9.1 i'm trying to eager load a relationship to a polymorphic target (the target uses joined table inheritance). here is example: http://pastebin.com/xSiHS4QW and this is output: SELECT ... FROM container LEFT OUTER JOIN root AS root_

[sqlalchemy] Re: Announcing new model code generation tool: sqlacodegen

2013-05-17 Thread Alex Grönholm
Forgot to add the link: https://pypi.python.org/pypi/sqlacodegen -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post t

[sqlalchemy] Announcing new model code generation tool: sqlacodegen

2013-05-17 Thread Alex Grönholm
After a while of trying to fix sqlautocode, I ended up writing a new tool instead. Copypasta from the README: - This is a tool that reads the structure of an existing database and generates the appropriate SQLAlchemy model code, using the declarative

[sqlalchemy] Fun with Macros: PINQ to SQLAlchemy

2013-05-17 Thread Haoyi Li
Hey All, I asked a few questions here a while ago to get help on a project, and thought it might be interesting to share the result of that project. PINQ to SQLAlchemy is a shameless clone of .NET's LINQ to SQL, using macros to perform th

[sqlalchemy] Re: How to close database connection of a session?

2013-05-17 Thread Bozhidar Cherkezov
Is *session.bind.dispose() *the same as *Engine.dispose()*? I'm asking that because the docs says *"**A new connection pool is created immediately after the old one has been disposed*", so you are destroying all connections in the pool to destroy one? I'm asking that because I need to close the