Created
November 30, 2010 01:06
-
-
Save peas/720944 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Query query = session.createQuery("select sum(p.valor) " + | |
"from ParcelaDeAula as p where " + | |
"p.contrato.dataDeCriacao <= :data " + | |
"and " + | |
"(p.dataDePagamento >= :data " + | |
"or (p.situacao = :situacao and (p.dataDePagamento = null and p.dataOriginalDeVencimento >= :data)) " + | |
")"); | |
query.setParameter("data", data); | |
query.setParameter("situacao", SituacaoDeParcela.PAGO); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment