I want to get a page of results using follwing Java code:
Page<MyDTO> page = repo.findAllOrderByCreatedDate(new PageRequest(pageNumber,pageSize));
In MyDTO I have:
@Entity
class MyDTO{
@Id
private Long id;
private LocalDateTime createdDate;
//getters setters
}
What I get is:
No parameter available for part createdDate SIMPLE_PROPERTY (1):
[Is, Equals].; nested exception is java.lang.IllegalArgumentException:
How to combine paging and sortig with Spring Data?