How to accept @OrderBy of JPA sort value as a dynamic parameter?
问题 I want to sort a nested collection property dynamically based on the query parameter sort. Suppose i have an entity A as class A{ @OneToMany(mappedBy="a") private Set<B> bset; } class B{ private LocalDate datefield; @ManyToOne private C c; } class C { private Double quantity; } I am calling repository of A with findAll(Specification specification,Pageable page) From UI, rest controller is called with sort param as below pattern url?page=0&size=10&sort=bset_datefield As it is a nested