About TypedQuery

71-80 of 143Refresh
Forum
2

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

go to count them; TypedQuery q = em.createQuery("SELECT COUNT(x) FROM Item x", Long.class ... howManyItemsExist(EntityManager em) {   TypedQuery q = em.createQuery("SELECT COUNT(x) FROM Item x", Long ... which) {   TypedQuery q = em.createQuery("SELECT o FROM Item o WHERE o.cachedKey = :cachedKey", Item.class);   q
Forum
1

"where in" query

> results; TypedQuery prezs = em.createQuery("SELECT p FROM Prez p WHERE p.id MEMBER OF :ids ... ();         TypedQuery prezs = em.createQuery(             "SELECT p FROM Prez p WHERE p.id MEMBER
Forum
1

createQuery method error

Hello, I am learning ObjectDB now. I create a simple Dao method as below:   public boolean isJobExist(String name) { TypedQuery query = em.createQuery( "SELECT count(j) FROM ... ] TypedQuery query = em.createQuery( ----------------------------------- Sounds like I
Forum
1

Duplicate Entity class names causes Exception in Query

Item findItem(EntityManager em, int which) { TypedQuery q = em.createNamedQuery("objdbTest ... ; } } public long howManyItemsExist(EntityManager em) { TypedQuery q = em.createNamedQuery("objdbTest
Forum
1

Eager Fetch is not stable for collection or map types?

(long id) {    EntityManager em = emf.createEntityManager();    try {     TypedQuery query = em ... .createEntityManager(); try { TypedQuery query = em.createQuery("select k from Game k where k.id=:id
Forum
1

EntityManagerFactory Fails To Swtich Over To Slave When Master Is Unavailable

();   }   // Retrieve all the Point objects from the database:   TypedQuery query = em.createQuery ... :   TypedQuery query = em.createQuery("SELECT p FROM Point p",     Point.class);   List
Forum
1

Field in Generic Class not persisted?

.Persistence; import javax.persistence.TypedQuery; import org.apache.commons.lang3 ... ();         em.clear();         TypedQuery q = em.createQuery("SELECT h FROM OBJ6 h", OBJ6.class
Forum
1

Help with 'not like/lower' query

.EntityManagerFactory; import javax.persistence.Persistence; import javax.persistence.TypedQuery ... .where(builder.like(builder.lower(path), stringProp));           TypedQuery query = em
Issue
1

InternalException

. If it helps this is the query that was causing it: TypedQuery q1 = em.createQuery ... though, also other simple Guest retrieval queries worked fine as well: TypedQuery q1 = em
Forum
1

java.lang.ClassCastException: CriteriaQueryImpl cannot be cast to java.util.List

query building operations), not results. To execute the query you have to create a TypedQuery (or ... :     criteriaQuery.select(root);     TypedQuery query = em.createQuery(criteriaQuery);     allPersons