I'm trying to replace an old persistence layer with Hibernate. A rather uncommon inheritance mapping is in use, I hope this example helps to clarify:
Looking at the mapping options in Hibernate, on first sight it seems to resemble "Table per subclass". But this strategy lacks a certain speciality I tried to show in the example: The property values for all classes are stored in the "leaf class table" with the exception of references, which are stored in the class table where they occur.
I haven't found any information on how to map this with Hibernate. I guess that it might not be possible, but who knows? If it is not possible, do you think there is some way to trick Hibernate into believing that there is a "normal" inheritance mapping?
[ EDIT: Confused thoughts deleted. ] [ April 19, 2008: Message edited by: Peter Merker ]
posted 9 years ago
I corrected the image. The only concrete classes in the inheritance tree are the "leaf classes". [ April 18, 2008: Message edited by: Peter Merker ]