These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Hybrid mapping thoughts
PostPosted: Fri Jun 24, 2005 11:29 am 
Newbie

Joined: Mon Jun 20, 2005 2:02 pm
Posts: 8
Location: San Jose, CA
I have a large class hierarchy which I am attempting to map using a mixture of techniques. In particular, I want to take advantage of the effeciency of the table per hierarchy and table per class polymorphism. I have a hierarchy which looks something like the following:

[code]interface Top
(reflexive association Component roles: group, part)
(reflexive association Dependency roles: dependent, independent)

interface Collection
(association MemberOfCollection roles: self: collection; top: member)
class VLANDefinition
class AdminDomain

interface ManagedElement
class ComputerSystem
class Service
class Chassis
[/code]

The actual class structure is much more complicated (there are about 100 classes and about 50 associations as well as more interface children of Top).

I would like to use table per hierarchy mapping for the trees below certain interfaces or concrete classes (for example, one table for Collection and its subclasses; one table for Chassis and its subclasses; one table for ManagedElement and its subclasses excluding Chassis.

Of course, I want the associations which range over Top to be inherited throughout the hierarchies appropriately.

For this example, I would have three tables (and others to deal with associations as required) and something regarding the polymophism interited from Top throughout the entire model.

In the actual model there are about 40 mapped classes excluding association classes.

I really do not have any good idea as to how to map this all to hibernate. I have used table per hierarchy but I do not know how to bind them all together. Indeed, when I attempt to translate the mapping using Hibernate (to load the mapping file) I am, reasonably, told that I have no mapping of Top. Of course, I don't know how to map top in this context.

Any further help much appreciated

_________________
Stephen Schleimer
(408) 527-3291
Cisco Systems, Inc


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.