max wrote:
If you could explain my boss, why to invest money into consulting to an open source tool, well there is no problem for me.
max wrote:
(and AFAIK not needed)
It is needed because it is the common java way!
There are so many (partly unanswered) examples out there and of course in this forum, but here is one again:
Interface A
Interface B
Interface C
Class D implements A, B, C
Class E implements A, C
Class F
with a one-to-many association to "any thing that implements A"
How do you map D,E and F? Even if you only map the concrete class, you won't be able to have an association with a polymorphic type. You can't say, that the association may end to D because this crashes the E class and viceversa. You could introduce "intermediate classes" to get a single inheritence mapped with union-subclass(es).
But what if there is another class:
Class G extends H implements A, B
and the inheritence is already mapped using union-subclass? How do you build up intermediate classes now?
So the only thing, that hibernate should support is tagging any entity by various interfaces to support polymorphism to this interfaces in associations and queries.
AFAIK this is essential!
Regards,
Robert