-->
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: Wide Inheritance Tree -> single table mapping question
PostPosted: Wed Mar 09, 2005 6:40 pm 
Regular
Regular

Joined: Fri Oct 01, 2004 2:19 am
Posts: 111
Location: Melbourne, Australia
Hibernate version: 3.0b4

I've tried this question over at the H3 forum, but perhaps it's applicable
here as well.

I would like to map an inheritance hierarchy which is very wide but not
very deep, in such a way that would not require me to create a
mapping for each of the derived classes
, as they vary only in
behaviour, but get Hiberanate to instantiate the appropriate type based on
class/type information that is stored in the database as a column.

An example of the type of model I want to persist is a set of Command
objects - they all share pretty much all the associated info about the
command like parameters, source/target objects, etc. However, the
behaviour, as you'd expect varies widely.

Is it possible to do? My current thinking is that I would have to have a
proxy of sorts which itself is mapped to the database, persisting the
appropriate proxied type in the database and upon loading, would
instantiate the actual type... Is there an easier way?

_________________
Cheers,

Bonny

please don't forget to rate :)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 10, 2005 6:07 pm 
Regular
Regular

Joined: Fri Oct 01, 2004 2:19 am
Posts: 111
Location: Melbourne, Australia
Sorry to bump, but surely someone has an answer to the question
somewhere within the Hibernate community?

_________________
Cheers,

Bonny

please don't forget to rate :)


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.