I have tried to add some Order to my
Criteria like this.
Code:
crit.addOrder(Order.asc("priority")); // Not the real property though
And test on my System using a MsAccess database with HSQLDialect And i get
Quote:
Caused by: org.hsqldb.HsqlException: invalid ORDER BY expression
So i tried to show the query, it reads like this
Code:
Hibernate:
/* criteria query */ select
distinct this_.i_id as y0_
from
T_FIT_ARTICLE this_
where
(
this_.b_export_ready=?
or this_.d_application_deadline>=?
)
order by
this_.d_application_deadline asc limit ?
//FROM HERE THE STACK TRACE
the thing is, i used the
@OrderBy annotation on my collection before, which produce almost the same query, and this works :
Code:
order by
elements2_.i_order_nr asc limit ?
But with the attributes in my Entity, it causes exception.
By the way, if i try to test the same programm with MYSQLServer, it works perfectly.
Any idea why or how could i avoid this ?
Many thanks !