-->
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: subclass without discriminator
PostPosted: Wed May 18, 2005 9:24 am 
Newbie

Joined: Mon Oct 13, 2003 12:57 pm
Posts: 3
Hi,

we have an entity which have a subclass.
The entity is persistent and the sublcass is not.

Now we want the subclass also to be persisted.

But in our case, no discriminator value exists to tell the difference between
the entity and the subclass (the subclass is just a different 'view' of the entity)

Is there some way to do this ?

thanks in advance for your help


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 18, 2005 9:35 am 
Regular
Regular

Joined: Mon Oct 06, 2003 7:17 am
Posts: 58
Location: Switzerland
If you use "joined-subclass" instead of "subclass" in your mapping file, then you don't need a discriminator. Every subclass has it's own table in the database with "joined-subclass".

Was that the answer to your question???

Reto


Top
 Profile  
 
 Post subject: Re: subclass without discriminator
PostPosted: Wed May 18, 2005 11:05 am 
Expert
Expert

Joined: Mon Feb 14, 2005 12:32 pm
Posts: 609
Location: Atlanta, GA - USA
john wrote:
Hi,

we have an entity which have a subclass.
The entity is persistent and the sublcass is not.

Now we want the subclass also to be persisted.

But in our case, no discriminator value exists to tell the difference between
the entity and the subclass (the subclass is just a different 'view' of the entity)

Is there some way to do this ?

thanks in advance for your help


Check out http://www.hibernate.org/41.html


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.