I have two existing tables in my database. Name them Table and Chair . Both of these tables display as objects in Hibernate.
Both of these tables have already existed in my database for some time, and they have their own, automatically generated identifier as primary keys.
Now, however, I want to group these objects under the very logical interface Furniture in my Java code so that I have a list in the House class .
I studied the inheritance of Hibernate, but did not seem to understand this. How can I let House class get a list of all the Furniture he owns? And which inheritance mapping strategy should be used?
Thanks Bart
source
share