Quote:
1. Subclass mappings always require a discriminator.
No way. this is an intrusion upon the relational model that your data modeller would not understand. It is required only because of the mechanics of ORM. (Having it as an *option* is a different matter, and has, in fact been proposed in the Road Map for 2.2.)
Quote:
2. The subclass mapping element is enhanced to allow the table to be specified.
3. This probably makes the <joined-subclass> element obsolete.
And break everyone's existing applications?? No Way.
Quote:
4. Maybe it should be considered moving the <subclass> tag from the mapping file of the root class to the mapping files of the individual subclasses.
This is already possible.
Now, there is some truth to what you say, but it is far from the whole truth. There is
no good, efficient way to map very large inheritance hierarchies in ORM. The n+1 selects that you get with the discriminator approach basically makes polymophic querying a no go, unless you are only going to access superclass properties (which is not really very polymorphic).
Really, there is no magic bullet here. All approaches have tradeoffs.
As I said though, we already (tentatively) propose to add support for freely mixing <subclass> and <join> elements in 2.2, which gives you what you want and much more. But this will be quite a bit of work.