Last updated 1 year ago
Was this helpful?
Kotlin JDSL has Sort interface to represent an order-by item in JPQL. To build Sort, you can use asc() and desc() after .
Sort
asc()
desc()
path(Book::isbn).asc() path(Book::isbn).desc()
Calling nullsFirst() or nullsLast() on Sort allows to specify where null values appear in an ordered result.
nullsFirst()
nullsLast()
path(Employee::nickname).asc().nullsFirst() path(Employee::nickname).asc().nullsLast()
Expression