[sqlalchemy] Re: Structured Inheritance model for ORM

2019-05-16 Thread Marcel Zoll
I forgot to state that all derived abstract orm classes (e.g Source_orm_lvl0, Source_orm_lvlA) also need the class attribute '__abstract__= True' set > myproj_lvl0 > | - meta_def [metadata0 Metadata; source_table = Tables(...)] > | - orm_def [from .meta_def import metadata, source_table; >

[sqlalchemy] Re: Structured Inheritance model for ORM

2019-05-16 Thread Marcel Zoll
So, I was eventually able to solve this. I followed this exact pattern as in my last post: --- level 0 ; 'myproj_lvl0'--- metadata//Tables >-plugs-into-< Base \/ OBJ01_Declared_lvl0 > OBJ01_Mapped_lvl0 --- level A ; module 'myproj_lvlA' --- \/ OBJ01_Extended_lvlA > OBJ01_Mapped_lvlA --- level B

Re: [sqlalchemy] Re: Structured Inheritance model for ORM

2019-05-16 Thread Marcel Zoll
> > > it's the "functional at each level" part that I think goes beyond what > is practical. When you run an operation on a superclass, and it > expects to do ORM operations, it has to be referring to the ultimate > mapped class. The ORM is designed with the idea that the concrete > instant

[sqlalchemy] Re: Structured Inheritance model for ORM

2019-05-15 Thread Marcel Zoll
> > Thank you, Mike, for having a look at my clumsy code (there were some > mistakes in the code, I only saw later) and making this effort. > Firstly, I have done a bit more tinkering yesterday, and also got aware, that the Mapper or the internal cranking for sqlalchemy in this hierarchical sc

[sqlalchemy] Structured Inheritance model for ORM

2019-05-14 Thread Marcel Zoll
Hi, I am struggling since some days to extend and implement common class inheritance for the SQLAlchemy ORM objects that I define: Here is the to be achieved task: 1. In a first step, I want to use sqlalchemy to model my database and the ORM, aka define tables, define the ORMs and their relation