I want to implement JPA Repository with sort direction for private LocalDateTime created_at;
. I tried this:
Service
@Override
public Page<PaymentTransactions> findAll(int page, int size) {
return dao.findAllByCreated_atDesc(PageRequest.of(page, size));
}
Repository
@Repository
public interface PaymentTransactionRepository extends JpaRepository<PaymentTransactions, Integer> {
Page<PaymentTransactions> findAllByCreated_atDesc(PageRequest of);
}
But I get error:
No property created found for type PaymentTransactions!
Do you know how I can implement this example properly?