-->
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.  [ 2 posts ] 
Author Message
 Post subject: About Jub-Class For Hql
PostPosted: Wed Oct 19, 2005 12:43 am 
Hi,
I can only get Base object(parent),
but I want to underside condition HQL and get dataBase Data,
What do I have to do?


Code:
   SELECT 
        p
   FROM
        //parent class
        Parent p
   WHERE
        //sub class condition
         P.childName="Test" OR p.Email="test@ww.com"


Code:
hbm.xml:

          <.........>
          <class name="parent">
                <joined-subclass name="child1">
                      <Property name="childName"/>
                </joined-subclass>

                <joined-subclass name="child2">
                      <Property name="Email"/>
                </joined-subclass>
          </class>

<...........>


Top
  
 
 Post subject:
PostPosted: Wed Oct 19, 2005 9:45 am 
Contributor
Contributor

Joined: Thu May 12, 2005 9:45 am
Posts: 593
Location: nhibernate.org
AFAIK, you need to run one query for each sub-class if you want to use their properties in the where clause.

_________________
Pierre Henri Kuaté.
Get NHibernate in Action Now!


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