Hi,
what i would like is to have the functionality provided by the <subclass> mapping, but where the properties defined for each subclass are specified in different tables.
For example:
Table MICROCHIPPED_CAT extends Table CAT
Table MICROCHIPPED_CAT has the property MICROCHIP_TAG_ID
I would like to define hibernate <class> mappings for both tables, and then within the CAT table use <subclass name="MicroChippedCat" discriminator-value="MCCat"/>.
The problem with this, is that Hibernate complains i'm tryin to map MicroChippedCat twice :(
I could move the MICROCHIP_TAG_ID property to the CAT Table, but that doesn't logically fit because of course not all cats have to or have been microchipped.
Also i do not want to use the <join-subclass> mapping, because i don't want Hibernate to join the two classes every time i query the CAT table.
Any suggestions/ideas on this subject?
cheers,
chico.
|