Reputation: 1284
I've an entity with boolean
type property. I am using spring-data-rest and I want to sort on multiple columns. The issue is I cannot rename the property in Entity as the code is already in production.
When I pass sort column which is boolean
type, the sort is ignored.
?sort=isPrimary,desc
When I pass other fields like name, it works as expected
?sort=name,desc
@Entity
public class Address{
private Integer id;
private String name;
private String address;
private boolean isPrimary;
}
Repository
@Repository
public class AddressRepository extends PagingAndSortingRepository<Address, Integer>{
Page<Address> findAll(Pageable pageable);
}
Upvotes: 0
Views: 37