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?