About TypedQuery

51-60 of 146Refresh
JPA Doc
3

javax.persistence.LockModeType

.setLockMode() or TypedQuery.setLockMode() method. Lock modes can be used to specify either optimistic or
JPA Doc
3

javax.persistence.Parameter

javax.persistence Interface Parameter Subinterfaces: ParameterExpression Type for query parameter objects. Since: JPA 2.0 See Also: Query TypedQuery Learn how to define and use JPA/JPQL queries in Chapter 4 of the ObjectDB/JPA manual. String getName() Return the parameter name, or null
JPA Doc
3

javax.persistence.PessimisticLockScope

of the EntityManager, Query, and TypedQuery interfaces that allow lock modes to be specified or used
Forum
3

Object as parameter results in exception

)));   TypedQuery q = getEntityManager().createQuery(c);   List resultList = q.getResultList ... .equal(p.get("owningCompany").get("id"), company.getId())));   TypedQuery q = getEntityManager ... please consider: Building the query (the CriteriaQuery and the TypedQuery) once with two parameters
Forum
2

Performance in large transactions

javax.persistence.OneToMany; import javax.persistence.Persistence; import javax.persistence.TypedQuery ... );   for (int m = 0; m < steps; m++) {    TypedQuery q = em.createQuery("SELECT m FROM MyEntity ... );    em.getTransaction().begin();    TypedQuery q = em.createQuery("SELECT m FROM
Forum
2

Join performance in Objectdb

("Query 1 started.");         ms = System.currentTimeMillis();         TypedQuery q1 = em ... = System.currentTimeMillis();         TypedQuery q2 = em.createQuery(             "SELECT ... ();         TypedQuery q1 = em.createQuery(             "SELECT COUNT(a.id) FROM A a", Long.class
Forum
2

Query results are not up to date for entities, not primitives

generic functions to build generic TypedQuerys. I just realized that the data retrieving up to date if I ... ")   I really need to use my generic functions to build the typedquerys! After such an update queries ... > Updates are done perfectly well. The problem is in the fact that I'm building the typedquerys
Forum
2

Cast exception?

cannot be cast to database.entity.Player From just fetching a single result: TypedQuery query = em ... work around it? You do cast implicitly by using TypedQuery with a Player.class (which might be loaded ... rather than TypedQuery and then check the result type (Player) and its class loader. Check also the class loader
Forum
2

JPA query of a Set of terms

that are already persisted. TypedQuery query = em.createQuery( "SELECT DISTINCT si.page FROM SearchIndex si ... of search terms. For example, for two search terms: TypedQuery query = em.createQuery ... terms; } In that case the query is simpler (and possibly faster): TypedQuery
Forum
2

Left join fetch behaviour doesn't retrieve children?

; import javax.persistence.Persistence; import javax.persistence.TypedQuery; public class ... left join fetch         em = emf.createEntityManager();         TypedQuery query ... using left join fetch   em = emf.createEntityManager();   TypedQuery query = em