As I read the hibernate reference document, I see that a discrimination for classes is possible where as for properties not possible.
But I believe that this would be very nice. (By sense, to do this, there must be a "table" property for the properties.)
Suppose that, I have a persistent class Book that has ID,name,type and stockarea. For the type value(discriminator), I need to get "stockarea" from lets say 4 tables. (Suppose that an idiot made this db schema and u have to get data from that schema and dont have the chance to change it:))).
In this architecture, I need to write 4 more classes that extend Book and then use discriminator value for each of them. That I means I have to write 4 meaningless classes just for getting one attribute.
In Addition to the mapping of classes , for some cases the hibernate may give the chance to map the attributes independent of the object and the object Table. I mean, it can be great if hibernate may "in some cases" attemp to a single attribute as a object.
<property name= ....
discriminator value=....
table=....
column =....
class = .....
|