Hibernate version:
2.1
Mapping documents:
<class
name="com.dsicdiiti.tnt.oms.test.TestData"
table="TEST"
dynamic-update="true"
>
<id
name="sysID"
type="java.lang.Long"
column="SYSID"
>
<generator class="com.dsicdiiti.tnt.common.util.HibernateGuidBridge" />
</id>
<many-to-one
name="housingData"
column="SYSID"
class="com.dsicdiiti.tnt.oms.housing.HousingData"
insert="false"
update="false"
>
</many-to-one>
Code between sessionFactory.openSession() and session.close():
Criteria crit = sess.createCriteria(TestData.class);
crit.add(Expression.like("lastName","Test%"));
crit.add(Expression.or(
Expression.isNull("relDate"),
Expression.isNotNull("relStdt")
) );
crit.setFirstResult(0);
crit.setMaxResults(10);
int queryCount = (int)crit.count();
List test = crit.list();
Full stack trace of any exception that occurs:
Name and version of the database you are using:
Oracle9i
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt:
I'm seeing a strange issue with a criteria search. I have mapped an association to my housing data class and it works fine. However, as soon as I use the setMaxResults method in the Criteria class I get a "column ambiguously defined" error. Any idea what would cause this error on that method?
Thanks,
twufire
|