-->
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: HQL class operator
PostPosted: Tue Oct 05, 2010 10:57 am 
Newbie

Joined: Tue Oct 05, 2010 10:46 am
Posts: 1
Hi,

I have a parent class with three children. Each child represents a table. I would like to run a query against the parent with params that are common to two of the three children. Two of the children contain a phone number column, but the third does not.

My HQL query looks something like:

SELECT p from parent p WHERE p.class in (Child1, Child2) and p.phone_number = '1234'.

When I try to run the query, I get the following exception:
org.hibernate.QueryException: could not resolve property: class of: Child3

Any help on what I'm doing wrong would be appreciated!

Thanks,

-john


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.