-->
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.  [ 3 posts ] 
Author Message
 Post subject: Wide Inheritance Tree -> single table mapping question
PostPosted: Tue Mar 08, 2005 8:18 pm 
Regular
Regular

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

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.

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:06 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  
 
 Post subject:
PostPosted: Fri Mar 11, 2005 12:16 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
You'd need a custom EntityPersister implemnetation to acheive this.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.