I have this JPA query which is used to select table with Specification Interface.
public List<PaymentTransactions> findAll(Specification<PaymentTransactions> spec) {
String hql = "select e from " + PaymentTransactions.class.getName() + " e";
TypedQuery<PaymentTransactions> query = entityManager.createQuery(hql, PaymentTransactions.class);
List<PaymentTransactions> paymentTransactions = query.getResultList();
return paymentTransactions;
}
What is the proper to select only the pessary columns from interface Specification using the above query?
org.springframework.data.jpa.domain interface public interface Specification<T> extends Serializable