[sqlalchemy] Polymorphic discriminator not being added to update queries

2018-01-11 Thread Mischa S
In [6]: ClassificationTask.query.update(values={'completed': True}) INFO [sqlalchemy.engine.base.Engine] base.py:679 BEGIN (implicit) INFO [sqlalchemy.engine.base.Engine] base.py:1140 UPDATE schwartz_task SET completed=%(completed)s INFO [sqlalchemy.engine.base.Engine] base.py:1143

Re: [sqlalchemy] How to make polymorphic identity condition involving a join not be a subselect

2017-11-27 Thread Mischa S
session.execute(f"SELECT id,task_type FROM task_type") task_id_type_map = dict() for r in task_type_id_map_res: task_id_type_map[r[0]] = r[1] return task_id_type_map Is this on this right path? On Monday, November 27, 2017 at 4:50:04 AM UTC+13, Mike Baye

Re: [sqlalchemy] How to make polymorphic identity condition involving a join not be a subselect

2017-11-27 Thread Mischa S
On Tuesday, November 28, 2017 at 4:10:42 AM UTC+13, Simon King wrote: > > On Sun, Nov 26, 2017 at 11:19 AM, Mischa S <mis...@jetbridge.com > > wrote: > > I want to have a polymorphic table that gets its identity from a column > in a > > "type" table

[sqlalchemy] How to make polymorphic identity condition involving a join not be a subselect

2017-11-26 Thread Mischa S
I want to have a polymorphic table that gets its identity from a column in a "type" table. I have a "task" table and a "task_type" table. I want to be able to create task subclasses that say something like: __mapper_args__ = { 'polymorphic_identity': 'do_stuff_task', }

[sqlalchemy] Posting missing?

2017-11-26 Thread Mischa S
My post https://groups.google.com/d/topic/sqlalchemy/jSDDH-vsNOg isn't visible, where did it go? -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See