0
I’m using JPA and creating an entity to store one date within the database. So far so good, the problem is that I need to display the database information according to the month of my date
. Do you happen to have a way when you perform JPQL ask to return only with the selected month? Example:
public void exemplo(Date data){
String jpql = "select t from time t where t.data.getmes() = cData"
Query query = em.createQuery(jpql);
query.setParameter("cData", data);
}