orm icon indicating copy to clipboard operation
orm copied to clipboard

How to support Model Inheritance?

Open SepehrBazyar opened this issue 3 years ago • 2 comments

Hi According to the defining structure of columns in attribute fields, how would supporting the inheritance be? Because by redefining attribute fields, parent's attribute fields will override and we will loose all our former data. We could define a field under a name and determine what class it would inherit from! But for supporting the models we need to actually do the inheritance; so it would duplicate our tasks.

SepehrBazyar avatar Apr 01 '22 23:04 SepehrBazyar

Just to be clear, you don't mean abstract classes, right? Both classes would be tables on the database, right?

aminalaee avatar Apr 02 '22 09:04 aminalaee

Just to be clear, you don't mean abstract classes, right? Both classes would be tables on the database, right?

the thing I figure out according to this structure is that no inheritance model can be supported; abstract can't get supported and Mixin structure too. About the profile model, I am not sure! There was no description in the document and I am not so certain how it should be!

SepehrBazyar avatar Apr 02 '22 18:04 SepehrBazyar