According to a specific requirement, for example, using an abstract base class (or superclass), I need to implement a simple hierarchy of two objects, one of which should distribute the other, but have the other own @Id.
My googling about this seems to be the conclusion that this is not possible or only on condition that I use a matched superclass (which in my case is forbidden due to a specific policy).
I don’t want to duplicate the code of an object with several dozens of attributes, and then mutate the duplicate by adding / redefining attributes to avoid problems with future maintenance, but then I got stuck in the limitations of JPA.
Any help / suggestion would be appreciated.
source
share