Hi all.
We have such db structure - main table with id, and set of table which id is foreign key to main table.
In application we want to have such class hierarchy - super class, mapped to main table, and for other table we want have ClassShort(small amout of columns are used, for example to use in list), which extends Super class, and ClassFull(whole amount of columns) which extends ClassShort.
So the question is how to mapp such structure. Hibernate v3
The problem is that we have to mix here to different strategies(table-per-subclass and table-per-class hierarchy). One solution I found is to use <subclass> whith <join>, but we do not have any discriminator column. Another way is to map ClassFull as joined-class to SuperClass and ClassShort separatly with polymorphism="explicit" and mutable="false", it will work, but seems not elegant :)
Thanks for help in advance
|