About setParameter

41-50 of 98Refresh
Issue
2

Update query bug

"); query.setParameter("code", personalCode); List> list = query.getResultList ... SET p.transports = :list WHERE p.personalCode = :code", Person.class); query2.setParameter("list", list); query2.setParameter("code", personalCode); query2.executeUpdate
Forum
2

JPA - ExceptionInInitializerError when creating EntityManager

).setMaxResults(1); EmailSettings smtp, port, from; smtp = emailSettings.setParameter("name", "SMTP").getSingleResult(); port = emailSettings.setParameter("name", "Port").getSingleResult(); from = emailSettings.setParameter("name", "EMAILFROM").getSingleResult
Forum
2

Calendar in Criteria Querys

));         results = em.createQuery(query)             .setParameter(p, Calendar.getInstance()).getResultList ... value had to be specified as a Timestamp: results = em.createQuery(query)     .setParameter(p
Forum
2

Criteria Query results in a NoResultException instead of returning object

"; Object val = em.createQuery(queryStr) .setParameter("identityObjectName", obj ... ) .setParameter("identityObjectName", "demo") .getSingleResult
Forum
2

Duplicate Entity class names causes Exception in Query

.Singleton.getItem", Item.class); q.setParameter("cachedKey", Integer.toString(which)); try ... .NoIdQuerySingleton.uniqueMapItem"); q.setParameter("cachedKey", cachedKey.toString());//ObjectDb demands
Forum
2

Eager Fetch is not stable for collection or map types?

.setParameter("id", id).getResultList();     if(result.size() > 0) {       Game g = result.get(0 ... ", Game.class); List result = query.setParameter("id", id).getResultList(); if(result
Forum
2

Get multiple entities by Id

");         query1.setParameter("id",idsToRequest);         List resultList1 = query1.getResultList ... MyEntity e WHERE e.name IN :id");         query2.setParameter("id",idsToRequest);         List
Forum
2

Getting sales quantity per country with a query, an idea anyone?

AND :toD "                                 + "GROUP BY ord.getCountry() ");         q2.setParameter("fromD", from.getTime());         q2.setParameter("toD", to.getTime());          List res
Forum
2

how to query by properties of onetomany relations? (Error 990)

the following code fails em.createQuery("select f from Foo f where f.bars.name = ?1", Foo.class).setParameter(1, barName) stacktrace: [ObjectDB 2.2.4] Unexpected exception (Error 990 ... (             "select count(f) from Foo f where f.bars.name = :name");         query.setParameter("name", "aaa
Forum
2

Mismatch client-server protocol prefix

WHERE t.username = :uname");         q.setParameter("uname", username);         TrackerUser result ... FROM Unit t WHERE LOWER(t.unitID) = LOWER(:uname)");         q.setParameter("uname", unitName