Hello
I have a JPQL query, with count
:
public Long quantidadeFaturasAbertasAssinante(Integer idAssin){ return manager.createQuery("select count(f) from Fatura f where f.dataLiquidacao IS NULL and f.assinante.id = :ass", Long.class) .setParameter("ass", idAssin) .getSingleResult(); }
When run the first time after starting tomcat, it returns the correct value. So I change some direct settlement date in the bank, but the value always remains the same until I restart tomcat.
It is as if it were cached, but I have already cleared the hibernate cache and it does not change. Any ideas?
I'm using version 4.3.8 of Hibernate, I've tried switching to 4.3.11 and it's no use. I'm using with JSF primefaces and CDI.