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: How to check for a specific subclass in an Criteria query
PostPosted: Tue Feb 17, 2009 11:21 am 
Newbie

Joined: Tue Feb 17, 2009 11:12 am
Posts: 1
Hi guys.

I have spent the last couple of hours searching for an answer, but I havent had any succes. I have a mapping file looking somewhat like the following:
Code:
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
   <class name="Type1" table="Type1">
      ...
      <property name="Name" type="String" />

      <joined-subclass name="Type2" table="Type2">
         <key column="AncestorId" />
         ...Properties
      </joined-subclass>

      <joined-subclass name="Type3" table="Type3">
         <key column="AncestorId" />
         ...Properties
      </joined-subclass>

      <joined-subclass name="Type4" table="Type4">
         <key column="AncestorId" />
         ...Properties
      </joined-subclass>
   </class>
</hibernate-mapping>


And now my question is - how do I build an ICriteria query that would select all Type3 and Type4 objects?


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.