I tried doing this, it seems to kind of work:
class TestTask(Task):
"""Test task - only for use in tests."""
__tablename__ = None # suuper needed without it polymorphic filter
will not work
task_type_name = TaskTypeEnum.test_worker_task.value
@task
def process(self):
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 > wrote:
> > 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
>
On Sun, Nov 26, 2017 at 11:19 AM, Mischa S wrote:
> 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__ = {
>
On Sun, Nov 26, 2017 at 6:19 AM, Mischa S wrote:
> 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__ = {
>
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',
}
(Assuming