[Hibernate] HQL parsing, ANTLR grammars and SQL query construction

2005-10-14 Thread Bjorn-Erik Townsend
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

[Hibernate] Ordering by a composite object produces invalid SQL

2005-10-13 Thread Bjorn-Erik Townsend
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