views:

57

answers:

0

If I have an @OrderBy("someProperty") annotation on an object and then use a Criteria to add an ORDER BY clause like so:

criteria.addOrder(Order.asc("id"));

The resulting SQL will do the ordering like this:

ORDER BY someProperty, id asc

Is it possible to change the order of the two or to remove the someProperty order? I can't remove the @OrderBy annotation and I'm using Hibernate for Java.