gstorm icon indicating copy to clipboard operation
gstorm copied to clipboard

GStorm does not take fields from inherited class as part of the table

Open aadamovich opened this issue 10 years ago • 3 comments

aadamovich avatar Dec 16 '14 16:12 aadamovich

Yeah, that was kinda intended behaviour to take only the fields declared in the class into consideration.

Inheritance would require implementing Table-per-Hierarchy vs Table-per-Concrete-Class vs Table-per-Subclass strategies to avoid duplicate columns and which may require referencing to data in base tables. Which is departure from single table philosophy of gstorm. Until I see pressing need, I think it's better to keep it simple.

Again, it's possible to provide just the most basic implementation which creates tables for each concrete class without worrying about any column dedupe strategy. Perhaps matter of time.

kdabir avatar Dec 16 '14 17:12 kdabir

I think basic implementation would be a logical choice for SINGLE Table ORM :) This can also be handled through annotation somehow e.g. @MapInheritedFields

aadamovich avatar Dec 17 '14 07:12 aadamovich

Yeah. I am keeping the issue open. Will most likely need to update *MetaData classes to get it to work. Will try it in some free time.

kdabir avatar Dec 17 '14 08:12 kdabir