Hi everyone!
I'm sorry, is there a way to query for a property type?
Here's my case:
I have 3 classes, mapped as
Code:
<hibernate-mapping>
<class name="test.Main" table="main">
<id name="id" column="id" type="long">
<generator class="native"/>
</id>
<many-to-one
name="other"
class="test.Other"
cascade="none"
outer-join="auto"
update="true"
insert="true"
column="idother"
/>
</class>
</hibernate-mapping>
Code:
<hibernate-mapping>
<class name="test.Other" table="other">
<id name="id" column="id" type="long">
<generator class="native"/>
</id>
<joined-subclass name="test.Sub">
<key column="id"/>
</joined-subclass>
</class>
</hibernate-mapping>
As you can see Main has a "other" property which can be a test.Other or a test.Sub.. Is there a way to express via Criteria a query like "get all the Mains with Subs"?
Hibernate version: 3.2.0
Many thanks for your attention!