-->
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: HQL: is it possible to select by subclass type?
PostPosted: Wed Apr 21, 2004 7:52 am 
Regular
Regular

Joined: Tue Jan 13, 2004 4:57 am
Posts: 83
Ditto: something like select cat from Cat cat where type(cat)='BlackCat' and BlackCat is a Cat subclass?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 21, 2004 7:53 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
select cat from BlackCat cat


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 21, 2004 7:57 am 
Regular
Regular

Joined: Tue Jan 13, 2004 4:57 am
Posts: 83
michael wrote:
select cat from BlackCat cat


Uhm... thanks, my question was badly posed, my case was actually a bit different:

select store
from Customer customer
join customer.address address
...
where type(address)='DeliveryAddress'


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 21, 2004 8:03 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
where address.class = 'DeliveryAddress'


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 21, 2004 8:07 am 
Regular
Regular

Joined: Tue Jan 13, 2004 4:57 am
Posts: 83
gavin wrote:
where address.class = 'DeliveryAddress'


Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 21, 2004 8:11 am 
Regular
Regular

Joined: Tue Jan 13, 2004 4:57 am
Posts: 83
immanuel wrote:
gavin wrote:
where address.class = 'DeliveryAddress'


Thanks.


Ah shit, it was documented in 10.7: sorry, didn't see it at a first search.


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.