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.  [ 2 posts ] 
Author Message
 Post subject: comonent class hierarchy, polymorphic component
PostPosted: Thu Aug 28, 2008 4:56 am 
Newbie

Joined: Wed Aug 06, 2008 3:57 am
Posts: 7
Location: Malaysia
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version: 3.2.26.GA

Hibernate has thus far excelled at mapping my complex legacy database.

However, is it still necessary to implement a UserType to get polymorphic components? Your expedited reply is most appreciated as I am about to do exactly that.

Consider the following scenario:

I have a Product entity.

I have a special kind of Product - ResearchAndDevelopmentProduct using the table per subclass strategy. ie we have a Discriminator value determining what kind of Product we have.

Now I'd like my Product to include a component (ProductComponent) that models some related fields and behaviors.

And I'd like my ResearchAndDevelopmentProduct to include a component (ResearchAndDevelopmentComponent) that includes polymorphic behaviors, relating to the same fields. Along with some additional fields and behaviors.

Please consider that I'm not at liberty to make changes to the legacy database (however much I may want to).


Top
 Profile  
 
 Post subject: err single table strategy, that is
PostPosted: Thu Aug 28, 2008 5:24 am 
Newbie

Joined: Wed Aug 06, 2008 3:57 am
Posts: 7
Location: Malaysia
Did I just type table-per-subclass? I meant single table.

In any case, I want the component type to be determined by the owning entity.


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

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.