I need to map the following hierarchy, but am not successful in creating
the appropriate mapping document:
Code:
DrawingTool
|
+----------+-----------+
RasterTool VectorTool TypeTool
| | |
+---+ +---------+ +
Brush SprayCan Polygon Ellipse Text
What I would like to end up with are 4 tables: one for DrawingTool and
one for each of the hierarchy bases (Raster,Vector,Type) etc.
Is it possible to do? I read the documentation and I am confused. It
seems to me that it is possible to create a mapping where the concrete
classes are mapped to separate tables and are joined, but I cannot
find a mapping that would create the set of tables I would like to have.
The reason for this mapping is that whilst for the most part (and the
example above is contrived) I will need to access instances using
the hierarchy bases (Raster, Vector, etc), I also need to be able to
access/store collections of these instances polymorphically.
Hibernate version: 3.0b4
Any help would be appreciated.
Cheers,
Bonny