Re: [sqlalchemy] Compiling to Postgres VALUES clause with bindparam

2019-02-11 Thread Martin Stein
ds .NET Core because of this, SQLAlchemy is the one library that singlehandedly keeps me in the Python world, because it's so amazing. Am Freitag, 8. Februar 2019 18:03:20 UTC+1 schrieb Mike Bayer: > > On Fri, Feb 8, 2019 at 10:05 AM Martin Stein > wrote: > > > > Am Donnerst

Re: [sqlalchemy] Compiling to Postgres VALUES clause with bindparam

2019-02-08 Thread Martin Stein
Am Donnerstag, 7. Februar 2019 23:45:09 UTC+1 schrieb Mike Bayer: > > > > note the mentioned issue is closed. IN supports an inline parameter now: > > https://docs.sqlalchemy.org/en/rel_1_2/orm/extensions/baked.html#baked-in > > We had started using the .op('IN') approach around v1.1 and I

[sqlalchemy] get(..)-query in single-table inheritance

2010-03-08 Thread Martin Stein
Hi all, Before I post a bug ticket I'll post the question here. In sqlalchemy 0.58, I use single-table inheritance and a get-query (by primary key). The get() queries for an Engineer with id 1, which does not exist (since the row with id 1 represents a Manager). The query result seems

[sqlalchemy] Re: get(..)-query in single-table inheritance

2010-03-08 Thread Martin Stein
If you view the .get(1) as conceptually similar to query(cls).filter_by(employee_id=1).all() then None would make sense. That's the way I've seen it so far. If you look at get(..) as a different concept, then an exception seems reasonable. Should I file a ticket when the trac box is up again?

[sqlalchemy] Re: Unnecessary join in eager one-to-many backref

2009-08-04 Thread Martin Stein
On Aug 3, 5:07 pm, Michael Bayer mike...@zzzcomputing.com wrote: Ok that's kind of interesting.   as a general rule, the ORM doesn't like to make assumptions.  such as here, there is a lazyloader on User.keywords, which says query for these Keyword objects, without any knowledge of what

[sqlalchemy] Unnecessary join in eager one-to-many backref

2009-08-03 Thread Martin Stein
Hi everybody, In my db-setup, there is a one-to-many relationship with a backref that is configured for eager loading (not the relation but the backref!). When I access the child objects of the parent object, the query from sqlalchemy joins back to the parent object (due to eager loading). In