I am trying to get list of data sorted by a property "created_at" by using the following method. But the Sort.by() method is not able to read the property name , it is only reading "created" not "created_at".
public List<Invoice> getAllInvoices() {
return repo.findAll(Sort.by("created_at").descending());
}
Below is the console message:
org.springframework.data.mapping.PropertyReferenceException: No property created found for type Invoice!