-->
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.  [ 4 posts ] 
Author Message
 Post subject: Possible to change inheritance startegy? - Annotations -
PostPosted: Thu Sep 24, 2009 11:55 am 
Regular
Regular

Joined: Thu Apr 14, 2005 10:39 am
Posts: 115
Hi, in my class hierarchy I use the strategy
"TABLE_PER_CLASS". Now at some node (abstract subclass form the root) in my inheritance tree, I want to switch to "SINGLE_TABLE" to map two leafs to the same table.

This code doesn't works, it is just ignored.
Code:
@Entity
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(name = "AssetOrIncome", discriminatorType = DiscriminatorType.STRING)


Is it possible? If yes, how?

Thanks.

Greetings Michael

PS: Sorry for cross posting, but wasn't able to delete the old post in "Hibernate users".


Top
 Profile  
 
 Post subject: Re: Possible to change inheritance startegy? - Annotations -
PostPosted: Fri Sep 25, 2009 7:01 am 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
Hibernate Users is the right forum. This forum is for Search, Validator and Shards :)


Top
 Profile  
 
 Post subject: Re: Possible to change inheritance startegy? - Annotations -
PostPosted: Fri Sep 25, 2009 11:20 am 
Regular
Regular

Joined: Thu Apr 14, 2005 10:39 am
Posts: 115
Are Annotations no longer an "optional Hibernate module" ?
Quote:
Search, Validator, Shards

Discussions about optional Hibernate modules.


The former forum for annotations has gone, so I taught this might be the right one.
Also all of my old posts to this former forum are listed here.
E. g. https://forum.hibernate.org/viewtopic.php?p=2363116#2363116

Hope I will get an answer in "Hibernate Users".

Thanks.

Greetings Michael


Top
 Profile  
 
 Post subject: Re: Possible to change inheritance startegy? - Annotations -
PostPosted: Sat Sep 26, 2009 8:07 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
yes it's a bit confusing, but the real experts on this subject read the other forum mostly so you get better help there;
yes Annotations are now a core component of Hibernate, as is EntityManager.

Quote:
Also all of my old posts to this former forum are listed here.

sure, we don't want to delete them ;-)

_________________
Sanne
http://in.relation.to/


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