All,
The following order-by in the mapping file worked with Hibernate 3.3 but is not working with the latest version?
order-by="(case when TO_DATE is null then 0 else 1 end), TO_DATE desc, FROM_DATE desc, CREATED_DATE desc, ID desc"
The error being reported is unexpected token: (
Code:
2011-06-15 14:15:14,962 DEBUG [main] (collection.AbstractCollectionPersister:611) - Static SQL for collection: com.jsi.fullcourt.domain.entity.Entity.names
2011-06-15 14:15:14,962 DEBUG [main] (collection.AbstractCollectionPersister:613) - Row insert: update NAME set ENTITY_ID=? where ID=?
2011-06-15 14:15:14,962 DEBUG [main] (collection.AbstractCollectionPersister:619) - Row delete: update NAME set ENTITY_ID=null where ENTITY_ID=? and ID=?
2011-06-15 14:15:14,963 DEBUG [main] (collection.AbstractCollectionPersister:622) - One-shot delete: update NAME set ENTITY_ID=null where ENTITY_ID=?
2011-06-15 14:15:14,963 TRACE [main] (antlr.OrderByFragmentParser:67) - -> orderByFragment
2011-06-15 14:15:14,963 TRACE [main] (antlr.OrderByFragmentParser:82) - orderByFragment
2011-06-15 14:15:14,963 TRACE [main] (antlr.OrderByFragmentParser:67) - ---> sortSpecification
2011-06-15 14:15:14,964 TRACE [main] (antlr.OrderByFragmentParser:82) - sortSpecification
2011-06-15 14:15:14,964 TRACE [main] (antlr.OrderByFragmentParser:67) - -----> sortKey
2011-06-15 14:15:14,964 TRACE [main] (antlr.OrderByFragmentParser:82) - sortKey
2011-06-15 14:15:14,964 TRACE [main] (antlr.OrderByFragmentParser:67) - -------> expression
2011-06-15 14:15:14,965 TRACE [main] (antlr.OrderByFragmentParser:82) - expression
line 1:1: unexpected token: (
2011-06-15 14:15:14,965 TRACE [main] (antlr.OrderByFragmentParser:75) - <------- expression
2011-06-15 14:15:14,965 TRACE [main] (antlr.OrderByFragmentParser:75) - <----- sortKey
line 1:45: unexpected token: )
Any reason why this is no longer supported? Or an alternate syntax?