-->
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.  [ 6 posts ] 
Author Message
 Post subject: hibernate not use discriminatorValue for Joined Inheritance
PostPosted: Fri Feb 12, 2010 4:14 pm 
Newbie

Joined: Fri Feb 12, 2010 4:09 pm
Posts: 10
I have no problems using discriminator Values if use single table approach.
But is it possible to force hibernate to use discriminator values for InheritanceType.JOINED?
Is it possible to do it use annotation? Thanks a million!


Last edited by bobxu1128 on Tue Feb 16, 2010 11:13 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: hibernate no use discriminatorValue for Joined Inheritance
PostPosted: Mon Feb 15, 2010 8:34 am 
Expert
Expert

Joined: Tue Jun 16, 2009 3:36 am
Posts: 990
Did you already try with @org.hibernate.annotations.ForceDiscriminator ?


Top
 Profile  
 
 Post subject: Re: hibernate no use discriminatorValue for Joined Inheritance
PostPosted: Tue Feb 16, 2010 11:13 am 
Newbie

Joined: Fri Feb 12, 2010 4:09 pm
Posts: 10
pb00067 wrote:
Did you already try with @org.hibernate.annotations.ForceDiscriminator ?


Yes, I did. I put ForceDiscriminator flag at the root entity right after @DiscriminatorColumn.


Top
 Profile  
 
 Post subject: Re: hibernate not use discriminatorValue for Joined Inheritance
PostPosted: Tue Feb 16, 2010 11:32 am 
Newbie

Joined: Fri Feb 12, 2010 4:09 pm
Posts: 10
My goals here are :
1. easy creation of entity classes, hibernate can recognize the discriminator values and use them instead of setting the values in the code. (using joined inheritance)
2. more importantly, I want to use joined inheritance but I also need to achieve better performance. By that I mean, when querying the root entity, I do NOT want my JPA provider to do a ton of left joins, I want to do it in a lazy fetching way. Is that possible ?
Any advice would be greatly appreciated!


Top
 Profile  
 
 Post subject: Re: hibernate not use discriminatorValue for Joined Inheritance
PostPosted: Wed Feb 17, 2010 10:26 am 
Newbie

Joined: Fri Feb 12, 2010 4:09 pm
Posts: 10
No one can help me ?


Top
 Profile  
 
 Post subject: Re: hibernate not use discriminatorValue for Joined Inheritance
PostPosted: Sat Mar 24, 2012 4:39 pm 
Newbie

Joined: Tue Jan 10, 2012 3:49 am
Posts: 7
Any answers for this?


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