Hi!
Is there a way to NOT prefer NULL in Order BY? I.e. assume this:
@Entity class Hint { private String name; } @Entity class Test { private Hint hint; }
I've got a few Test entries, some do have a hint assigned, some do not (NULL). Now when I do something like
SELECT FROM Test ORDER BY hint.name
It orders ASC like this (assuming I've got three Test Entities whereas first one points to Hint{name=A}, second one to Hint{name=B} and third one to NULL:
Test 3 (with hint = NULL) Test 1 (with hint = A ) Test 2 (with hint = B)
And descending:
Test 2 (with hint = B) Test 1 (with hint = A) Test 3 (with hint = NULL)
Descending looks just fine though what I want for ASC (because it simply makes more sense) is:
Test 1 (with hint = A) Test 2 (with hint = B) Test 3 (with hint = NULL)
Any ideas?
thanks,
Alex