Folk,
I am new to Hibernate but have not found relevant info for this question.
I have a rich information model (IM) (the DMTF's CIM as mapped for Cisco System's needs). The IM is rooted in a single class, Top. Top is abstract. Top is used extensively as a member of associations so that the association behavior is generally inherited. In most cases, these associations are many-to-many.
I plan to use the "first concrete class" approach to assigning subtrees in the hierarchy to tables. In addition, I will support individual developers desire to partition further than the first concrete class (they may cut the inheritance tree further down to create more fine grained tables). Using this technique, I find that I have about 80 tables.
The problem arises when I attempt the create the many-to-many association mappings. In so far as the associations are defined at the highest layer of the IM, I must provide association mapping for every table. For the many-to-many mappings, I find that I would create around 1200 mapping tables to deal with the top 15 associations alone. The number of tables alone is not the problem. The problem is the joins which will have to be created when an association is walked at a high level in the IM.
I am hoping that I can create a single mapping table per association. However, to do this, I must be able to refer to multiple tables implementing the objects (using the first concrete class method to partition the IM) from a single mapping table. I have no idea how such referencing might be possible OR if there is a better way to do the job to begin with.
Hoping for some insights :-)
-steve[/list]
_________________ Stephen Schleimer
(408) 527-3291
Cisco Systems, Inc
|