Quote:
<many-to-one name="rule_id"
column="rule_id"
class="com.accuserverx.accucharge.dao.hibernate.Rule"
not-null="true" />
<many-to-one name="inbound_id"
column="inbound_id"
class="com.accuserverx.accucharge.dao.hibernate.InboundTransactions"
not-null="true" />
and the criteria I pass in my action class are:
List workListErrors = session.createCriteria(WorkListErrors.class)
.createCriteria("InboundTransactions")
.add(Expression.gt("department", new Integer(601)))
.list();
Please use the code tags and so on to make your post more readable.
I don't see where you're joining tables. Then, you must use property names (name attribute), not class names inside create(sub)Criteria().
So, try somethink more like :
Code:
List workListErrors = session.createCriteria(WorkListErrors.class)
.createCriteria("inbound_id")
.add(Restrictions.gt("department", new Integer(601)))
.list();
* Use Restrictions class instead of Expression which is "semi-deprecated" as specified in the javadoc.
* I guess you meant inbound instead of inbound_id for the relation name. In fact, you're referencing here an InboundTransactions object, not only its primary key. Here you are on the object side :-)
HTH