Re: [sqlalchemy] [Q] How to return mapped instances from a recursive cte

2012-09-06 Thread Ladislav Lenart
It works! Thank you very much for such a quick response! It is a pity I was unable to find it on my own though. I spent several hours searching and reading various parts of SA documentation and on stackoverflow - I am a SQL / SA newbie and there is A LOT to read. But I've read select_from API

Re: [sqlalchemy] [Q] How to return mapped instances from a recursive cte

2012-09-06 Thread Michael Bayer
On Sep 6, 2012, at 5:07 AM, Ladislav Lenart wrote: It works! Thank you very much for such a quick response! It is a pity I was unable to find it on my own though. I spent several hours searching and reading various parts of SA documentation and on stackoverflow - I am a SQL / SA newbie

Re: [sqlalchemy] [Q] How to return mapped instances from a recursive cte

2012-09-06 Thread Ladislav Lenart
Hello. On 6.9.2012 13:04, Michael Bayer wrote: On Sep 6, 2012, at 5:07 AM, Ladislav Lenart wrote: It works! Thank you very much for such a quick response! It is a pity I was unable to find it on my own though. I spent several hours searching and reading various parts of SA documentation

Re: [sqlalchemy] [Q] How to return mapped instances from a recursive cte

2012-09-06 Thread Michael Bayer
On Sep 6, 2012, at 7:25 AM, Ladislav Lenart wrote: Hello. On 6.9.2012 13:04, Michael Bayer wrote: On Sep 6, 2012, at 5:07 AM, Ladislav Lenart wrote: It works! Thank you very much for such a quick response! It is a pity I was unable to find it on my own though. I spent several hours

Re: [sqlalchemy] [Q] How to return mapped instances from a recursive cte

2012-09-06 Thread Ladislav Lenart
Thank you for the explanation / brief history overview. Now it makes perfect sense why things are the way they are. Keep up the excellent work! Hopefully one day my knowledge of SQL Alchemy will catch up too :-) Ladislav Lenart On 6.9.2012 16:23, Michael Bayer wrote: On Sep 6, 2012, at 7:25

[sqlalchemy] Using __getattr__ and __setattr__ with sqlalchemy

2012-09-06 Thread Jacob Biesinger
Hi all, Are there any best practices/caveats for overloading attribute access with declarative sqlalchemy? I feel like the checks in setattr and getattr are very hacky and are occasionally giving me strange surprises... from sqlalchemy import Integer, String, Column, create_engine, PickleType

[sqlalchemy] Many-to-many secondaryjoin with filter

2012-09-06 Thread Kuba Dolecki
Hello, I have been struggling for a few hours with the following issue. First, the models: stack_resources = db.Table('stack_resources', db.Column('stack_id', db.Integer, db.ForeignKey('stack.id')), db.Column('resource_id', db.Integer, db.ForeignKey('resource.id')) ) class

[sqlalchemy] Re: Many-to-many secondaryjoin with filter

2012-09-06 Thread Kuba Dolecki
Oh, and Stack has __tablename__ = stack and Resource has __tablename__ = resource just to reduce any confusion. On Thursday, September 6, 2012 6:55:22 PM UTC-4, Kuba Dolecki wrote: Hello, I have been struggling for a few hours with the following issue. First, the models: stack_resources