Hibernate version:
3.0rc1
Mapping documents:
Code:
<class name="com.website.Member" table="member">
<id name="id" type="integer">
<generator class="identity"/>
</id>
<property name="name">
...
<many-to-one name="state" column="state" outer-join="true"/>
</class>
Code between sessionFactory.openSession() and session.close():Code:
Criteria countCrit = session.createCriteria(Member.class)
.setProjection(Projections.rowCount())
.add(Example.create(example));
When this criteria query runs, it does any outer join of state. Now, I know I specified that I was this to happen in the mapping document, but for this ONE time I'd really like this not to happen. In actuality, the search criteria is much more complicated then that and Hibernate is joining in tables all over the place that I don't need. I looked at the fetch types, but there is no type DONT_DO_IT_AT_ALL, so I worry that I may be out of luck. Any suggestions? Thanks!