Hi,
a little bit of context on this weird subject first :)
We face an issue with sorting our data because we are using Enum type to manage some of our columns. That said, on DB side ( Oracle FWIW ) we store an NUMBER value that is decode java side to show a String Label. Of course when we try to order by, we got int ordering, that does not match String Label ordering, but we want to order on DB because we also have pagination in place, so order must be done before paging of course.
Is there a way to do the correct string ordering "after decode" and get it translated in DB ordering at query time? Such as in memory java decode, or don't know temporay tables that exists only in java to join with regular queries on db.. I have no idea..
Thank you