So I sent an email to this list yesterday about an issue I encountered
where I get malformed SQL when I make an HQL createQuery() call
containing an "order by" clause which refers to a composite ID. I
haven't gotten any responses to that email, but I've dived into the
Hibernate source and am
Ordering by a composite object, as the subject says, produces invalid
SQL. Using the following query,
return getSession().createQuery("from NewOrder as no where
no.orderId.district.districtId.d_id=?" +
" and no.orderId.district.districtId.warehouse=?" +
" order b