[sqlalchemy] Confusion over session.dirty, query, and flush

2017-11-15 Thread jens . troeger
Hello, I've been exploring some of the session functionality that handles object states, and I'm quite confused. Here is what I see: >>> engine = engine_from_config({'sqlalchemy.url': 'mysql+pymysql://…'}) >>> session_factory = sessionmaker(bind=engine) # No autoflush >>> session =

Re: [sqlalchemy] preventing columns from being returned or accessed, but allowing them to be used in filters for serverside comparisons?

2017-11-15 Thread Mike Bayer
On Wed, Nov 15, 2017 at 3:49 PM, Jonathan Vanasco wrote: > This is a bit of an odd request, but here goes: > > A table in postgresql has some columns with sensitive data which should be > secured against visibility by one of our applications (we use a central > SqlAlchemy

[sqlalchemy] preventing columns from being returned or accessed, but allowing them to be used in filters for serverside comparisons?

2017-11-15 Thread Jonathan Vanasco
This is a bit of an odd request, but here goes: A table in postgresql has some columns with sensitive data which should be secured against visibility by one of our applications (we use a central SqlAlchemy model for multiple applications) Currently we use an environment var to determine if the

Re: [sqlalchemy] Two classes linked to the same backref attribute in a third classe

2017-11-15 Thread Mike Bayer
Oh weird, it must have gotten erased before I pressed send...whoops! On Nov 15, 2017 4:03 AM, "Simon King" wrote: > On Wed, Nov 15, 2017 at 12:10 AM, Mike Bayer > wrote: > > On Tue, Nov 14, 2017 at 2:58 PM, Olaf wrote: >

Re: [sqlalchemy] Two classes linked to the same backref attribute in a third classe

2017-11-15 Thread Simon King
On Wed, Nov 15, 2017 at 12:10 AM, Mike Bayer wrote: > On Tue, Nov 14, 2017 at 2:58 PM, Olaf wrote: >> Hello everybody. >> >> Is it possible to have the following relationships between three classes >> (Animal, Car, Description) ? >> >> * An animal