-->
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.  [ 1 post ] 
Author Message
 Post subject: problem with .class operator in hql
PostPosted: Tue May 20, 2008 11:53 am 
Beginner
Beginner

Joined: Wed Jan 16, 2008 8:16 am
Posts: 23
hi,

I'm using an object model which has following structure:

Code:
             Base
               |
      ------------------------------------
     |                |                   |
   Sub1            Sub2                 Sub3
     |
  ----------
  |         |
Sub11    Sub12


when I'm writing following hql construct
Code:
from Base b where b.class in (Sub11, Sub12, Sub2)
it works fine and hibernate uses the wright disrimenator values.

But when I want to facilitate the hql statement, while using the super class of Sub11 and Sub12, hibernate doesnt know the discrimenators - example:
Code:
from Base b where b.class in (Sub1, Sub2)
.

This seems for me, that hibernate only knows the discrimenator for concrete classes and not for super classes - when using the .class construct.

Or the other way round, how can I find out which discriminators are used for the all subclasses.

Thanks in advance,
best regards,
Michi


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.