Read the rules before posting!
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version: 2.1.8
Mapping documents:
<class our.class
proxy=our.class
table class>
<property name="objOid" type="java.lang.Long" column="obj_oid">
<many-to-one name="parent"
class="our.class" column="class_parent_oid" />
<bag name="subclass" inverse="true" lazy="true">
<key column="class_parent_oid"/>
<one-to-many class="our.class"/>
</bag>
</class>
Name and version of the database you are using:
Postgres 7.4
This question seems to be avoided quite a bit, as I have been unable to unearth a similar question that has an answer. What I want to know is whether I can add an expression to a QBC I am doing on class that will only give me class.
In sql, I could pull of the query as
select cl.* from class cl where (select count(*) from class where class_parent_oid=cl.obj_oid) <> 0 and cl.class_parent_oid is null;
So is there a test for collection size in the criteria api, or is there a way to pull of the same query I just outlined?
-Andy