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: Modular mappings for subclasses with no additional fields...
PostPosted: Mon Jun 20, 2005 6:18 pm 
Newbie

Joined: Mon Dec 27, 2004 3:44 am
Posts: 9
Hi all,
We are using Hibernate 2.1.7 in our application and allow end users to extend our object model with their own subclasses. The end users may not modify our default mapping files or code, but can specify their own subclass mappings using their own modular mapping files as specified in section 5.4 of the hibernate docs. This works fine using joined subclasses when the users have created their own subclasses with additional fields, but it is not optimal to require end users to use a "joined subclass" mapping if all their subclass does is add functionality and not any new persistent fields. i.e. - in this case the separate subclass table would be redundant. Is the correct answer here to specify a discriminator column for our default class out of the box (table per class hierarchy) and use a modular mapping file that uses the "subclass" mapping? This too seems wasteful as this column will be just wasted space when the class ends up not being subclassed by the end user. What is the best practice here?

Edward


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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.