Home » Search

About setParameter

91-95 of 95Refresh
Forum
1

Visibility of changes in Transaction is not visible to a JPA QL Query

.setParameter("cachedKey", Integer.toString(which));   return q.getSingleResult
Issue
1

Wrong type on SUM function

Hello, I have a problem when I run this aggregation query: Query q = em.createQuery(         "SELECT cc.totalCC.moneda, SUM(cc.totalCC.importe) FROM ComprobanteContable cc " +         "WHERE cc.cuenta=:cuenta GROUP BY cc.totalCC.moneda"); List resultList = q.setParameter("cuenta
Forum
1

IN expression in a Criteria Query

=             em.createQuery("SELECT e FROM MyEntity e WHERE e.str IN (:bindVar)");         query.setParameter
Forum
1

Query can't see recently persisted object

.setParameter("oid", oid); if ("-62e6083d:1612795a01c:-6e65".equals(oid)) { logger.debug
Forum
1

fetch by enum

I have Entity named Fruits  with a column Type which is a enum. I want to fetch the based on Type  Eg.  Query qry= em.createQuery("Select f from Fruits f where f.Type =: t ");         qry.setParameter("t",Type.Sweet);   But it return a null result list.   It should work. Please provide a minimal