Wouldn't it be helpful if we could define default sorting on an entity, for example by annotation:
@DefaultSort({
@PropertyOrder(value = "creationDate", direction = Direction.DESC),
@PropertyOrder("id")
})
public class Message { ... }
Repositories would append this default sorting to the custom sorting, if any.
