Open tbee opened 1 month ago
upgrade from 14
Ah no we literally can't upgrade to 15 with an application that uses @Inheritance
. We have to keep those applications on 14, which is to say that 14 and 15 are the same but with various features removed from 15 and that includes support for @Inheritance
which might sound drastic but there is some background reading referenced below.
Refer to: https://github.com/ebean-orm/ebean/releases/tag/15.0.0-RC
And refer to the discussions leading up to it at: https://github.com/ebean-orm/ebean/discussions/3112
So ponder those discussions etc but no we need to stay on 14 for apps using @inheritance
[and this is why we need to keep releasing both 14 and 15 etc]. Also apologies because I need to improve 15 to better error when it detects inheritance mapping.
Oh my. I can understand you do not want to support all the more complex inheritance types, but single table is used a lot to do polymorphism: in this case have a generic product with 15 or so subtypes. It can just be some different behaviour, code only, but it is the natural (OOP) place for that code to live... And the ORM should return the correct class. Is it really so complex to instantiate and populate the correct class based on the discriminator?
Given these classes:
The annotations are in the jakarta.persistence package.
Expected behavior
This should work:
Actual behavior
Somehow it tries to instantiate the abstract class or something. Continuing the investigation