About TypedQuery

61-70 of 143Refresh
Issue
2

@FetchGroup in JPA similar to JDO

with only those fields filled with data: TypedQuery query = em.createQuery("SELECT e FROM Entity e", Entity.class ... : TypedQuery query = em.createQuery("select e.firstName, e.lastName FROM Entity e", Tuple ... constructors to Entity and change query to TypedQuery query = em.createQuery("select new
Forum
2

Error 363 - Failed to read value of inverse relationship

; try { TypedQuery query = getEntityManager().createQuery("SELECT p FROM Player p ... getPlayer(String name) {         if (name == null) return null;         try {             TypedQuery ... ) { //        if (playerName == null) return null; //        try { //            TypedQuery query = db
Forum
2

How to use JOIN FETCH?

.TemporalType; import javax.persistence.TypedQuery; public class Eager2 { public static void main ... );   em.getTransaction().commit();   TypedQuery
aq = em.createQuery("select a from Address ... .   TypedQuery q = em.createQuery(         "select p from Person p join fetch p.addressHistory
Forum
2

Internal exception when updating date filed (TemporalType.DATE)

();                 TypedQuery personQuery = entityManager.createQuery ... .persistence.Query; import javax.persistence.Temporal; import javax.persistence.TypedQuery; public class ... .getTransaction().begin(); TypedQuery personQuery = entityManager
Forum
2

java.lang.ClassCastException in OSGi runtime when loading data from DB

that seems to throw the exception: @Override public Person loadPerson(final Integer id) {   TypedQuery typedQuery = entityManager.createQuery("SELECT FROM Person p WHERE p.id = 1", Person.class);   Person singleResult = typedQuery.getSingleResult();   System.out.println(singleResult);   return
Forum
2

ObectDb 2.3.6 in OSGi environment

to call the second bundle in following way with a JUnit Plugin test: TypedQuery query =  (TypedQuery) this.dbService.createNamedQuery("RuleValueNode.findRoot", RuleValueNode.class ... required bundle, and the simple access to the db: @Override public TypedQuery createNamedQuery
Issue
2

Once served to JSF page via @EJB query bean, many list fields are null (but same query ok after fresh persist in @PostConstruct)

): protected void testQuery() { String $i = "testQuery"; TypedQuery query = em ... > findElements() {         String $i = "testQuery";         TypedQuery query = em.createQuery("SELECT ... ";         TypedQuery query = em.createQuery(             "SELECT e FROM Element e", Element
Forum
2

Query on Embedded Primary Key?

.Persistence; import javax.persistence.TypedQuery; @Entity public class OBJ2 implements Serializable ... .getTransaction().commit();         em.clear();         TypedQuery query = em.createQuery ... .getResultList();         String q = ret.get(0).getClass().getCanonicalName();         TypedQuery
Forum
2

Retrieve data of all entity classes in a single query

+ " s"; // This works for all classes TypedQuery query = em.createQuery(tmpQuery ... to use TypedQuery instead of TypedQuery but had casting issues   You can retrieve
Forum
2

Searching lists within objects

);         TypedQuery typedQuery = em.createQuery(q);         List results = typedQuery