Internal Website Search
51-100 of 137 resultsCast exception? to database.entity.Player From just fetching a single result: TypedQuery query = em ... TypedQuery with a Player.class ( which might be loaded by a different class loader than the one that in ... ). Please post details about both class loaders. Run the query as Query rather than TypedQuery and then check | |
JPA query of a Set of terms that are already persisted. TypedQuery query = em.createQuery( "SELECT DISTINCT si.page FROM SearchIndex si ... based on the number of search terms. For example, for two search terms: TypedQuery query = em ... { @Index List terms; } In that case the query is simpler (and possibly faster): TypedQuery query | |
Retrieve data of all entity classes in a single query for all classes TypedQuery query = em.createQuery(tmpQuery, Athlete.class); // I want to avoid this List results ... )? I tried to use TypedQuery instead of TypedQuery but had casting issues ezazop Akis | |
New to Product & Having An Issue()); } @Test public void queryDepById(){ TypedQuery q = em.createNamedQuery("Department.findByPK ... ()); this.foundResult = d; } @Test public void queryDepByIdComponents(){ TypedQuery &lr;Department q = em ... . TypedQuery q = em.createNamedQuery("Department.findAll", Department.class); q.setMaxResults(1000); List | |
Catching exceptions from online backup accessible via some API or the TypedQuery .getSingleResult() would accept a parameter of type ... ; TypedQuery backupQuery = em . createQuery ( "objectdb ... . createEntityManager ( ) ; try { TypedQuery backupQuery = em . createQuery ( "objectdb backup | |
Query on Embedded Primary Key?.Persistence; import javax.persistence. TypedQuery ; @Entity public class OBJ2 implements Serializable ... ; TypedQuery query = em.createQuery("SELECT mif.primkeycopy FROM OBJ2 ... ; TypedQuery query2 = em.createQuery("SELECT mif.primkey FROM | |
ObectDb 2.3.6 in OSGi environment bundle I'm trying to call the second bundle in following way with a JUnit Plugin test: TypedQuery query = ( TypedQuery ) this.dbService.createNamedQuery("RuleValueNode.findRoot", RuleValueNode ... .objectDb as required bundle, and the simple access to the db: @Override public TypedQuery | |
Searching lists within objects).where(pred); TypedQuery typedQuery = em.createQuery(q); List results = typedQuery .getResultList(); If I try | |
How to use JOIN FETCH?.persistence.TemporalType; import javax.persistence. TypedQuery ; public class Eager2 { public static void main ... .getTransaction().commit(); TypedQuery aq = em.createQuery("select a from Address a",Address.class); System.out.println(aq.getResultList()); // Prints out both addresses OK. TypedQuery q | |
Error 363 - Failed to read value of inverse relationship(String name) { if (name == null) return null; try { TypedQuery query = getEntityManager().createQuery ... ; TypedQuery query = db.createQuery("SELECT p FROM ... ; TypedQuery query = db.createQuery("SELECT m FROM Message m | |
Left join fetch behaviour doesn't retrieve children?.persistence.Persistence; import javax.persistence. TypedQuery ; public class ObjectDbTest {   ... ; TypedQuery query =   ... .createEntityManager(); TypedQuery query = em .createQuery(   | |
java.lang.ClassCastException in OSGi runtime when loading data from DB; TypedQuery typedQuery = entityManager.createQuery("SELECT FROM Person p WHERE p.id = 1", Person.class); Person singleResult = typedQuery .getSingleResult(); System.out.println(singleResult | |
Embedded List this to access it. TypedQuery tqItem = emf.createEntityManager().createNamedQuery("ItemDB.getPart", ItemDB.class ... (); TypedQuery tqItems = em.createQuery | |
Duplicate Entity class names causes Exception in Query which) { TypedQuery q = em.createNamedQuery("objdbTest.Singleton.getItem", Item.class); q ... (NoResultException e) { return null; } } public long howManyItemsExist(EntityManager em) { TypedQuery q = em | |
zip file or JAR manifest missing the query with TypedQuery : TypedQuery q2 = em.createQuery(sQ2, ItemList.class); support | |
Join query problem with new statetment Hi, I'm trying to implement some reporting logic in my application and got nasty exception when using query with join. The query code is: TypedQuery inspirationQuery = em.createQuery(   ... to: TypedQuery inspirationQuery = em.createQuery( "select new InspirationsPerSupplierResult(insp, p | |
Need help to make this test work and define proper annotations for entities Lists javax.persistence.Id; import javax.persistence.Persistence; import javax.persistence. TypedQuery ... ; TypedQuery query = em.createQuery("SELECT ord FROM OrderDat ord", OrderDat.class | |
Merge with Parent/Child entities not possible.persistence. TypedQuery ; import org.junit.After; import org.junit.Assert; import org.junit.Before ... ; closeEntityManager(entityManager); } @Test public void test() { TypedQuery parentEntityQuery | |
openejb jpa jaas module.Persistence; import javax.persistence. TypedQuery ; import javax.security.auth.Subject; import javax ... .getPrincipals(); final int id = info.getId(); final TypedQuery namedQuery = entityManager.createNamedQuery | |
Query all objects that implements a given interface - is that possible? Hi, I am trying query one of my DB - for all object types that implement a given interface. TypedQuery query = em.createQuery ... ; TypedQuery query = em.createQuery("SELECT bk | |
Failing in embedded mode, correct javax.persistance? use "javax.persistence_1.99.0.jar" I get an error using TypedQuery . I have therefore tried "javax.persistence-2.2.0-release.jar". Then TypedQuery is recognized but the "No Persistence provider" error | |
java.lang.ClassCastException: CriteriaQueryImpl cannot be cast to java.util.List you have to create a TypedQuery (or Query ) instance from your CriteriaQuery   ... ; TypedQuery query = em.createQuery(criteriaQuery); allPersons | |
Visibility of changes in Transaction is not visible to a JPA QL Query; TypedQuery q = em.createQuery("SELECT COUNT(x) FROM Item x", Long.class); try {   ... ; public Item findItem(EntityManager em, int which) { TypedQuery q = em.createQuery | |
Updating Entities("oldRate: " + oldRate + "\tnewRate: " + newRate); TypedQuery query = Main.paygradeDB.createQuery("SELECT FROM Paygrade ORDER BY rate", Paygrade.class); TypedQuery modifyTo = Main.paygradeDB | |
Help with 'not like/lower' query.persistence. TypedQuery ; import javax.persistence.criteria.CriteriaBuilder; import javax.persistence.criteria ... ; TypedQuery query = em.createQuery(c); query | |
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 MFJob j WHERE j ... cannot be applied to (java.lang.String,java.lang.Class ) [javac] TypedQuery query = em.createQuery | |
JPQL keyword in entity - what to do? this: TypedQuery q = em.createQuery( "select new pl.hplxtool.model.ResultData(p.type.name, count(p.id)) " + "from ... with above query and got another exception after modification to this form: TypedQuery q = em.createQuery( "select | |
Eager Fetch is not stable for collection or map types? { TypedQuery query = em.createQuery("select k from Game k where k.id=:id", Game.class ... .createEntityManager(); try { TypedQuery query = em.createQuery("select k from Game k where k.id=:id", Game | |
Field in Generic Class not persisted?.Persistence; import javax.persistence. TypedQuery ; import org.apache.commons.lang3.SerializationUtils ... ; em.clear(); TypedQuery q = em | |
Threading Problem (maybe with Criteria) No error using SQL String statement TypedQuery query= manager.createQuery("SELECT NEW AdvoluxUID(p.m_uid ... )); TypedQuery query= manager.createQuery(cquery); best regards Arne Arne Arne Stocker Thank | |
Issue with orphanRemoval and multiple EntityManagers.getTransaction().commit(); TypedQuery q3 = em.createQuery(   | |
ClassCastException of same object type. Yet the TypedQuery should be returning XCCompetitorCount objects! The add() method | |
JPA inheritance issue with ObjectDB - Field not found in type error"); System.out.println("JPQL: " + temSQL); System.out.println("Parameters: " + parameters); TypedQuery | |
Online backup problem; TypedQuery backupQuery = em.createQuery("objectdb backup", Thread.class);   | |
Schema-Update: Rename superclass and remove one subclass; If we try to ecexute a Query (in the second main method): TypedQuery q = em.createQuery("SELECT c | |
Problem with queries on lists with reverse mapping = "team" are removed from Team the query returns the expected result. TypedQuery query7 = em.createQuery | |
Exception on creation when running multithreaded also had: typedQuery .setFlushMode(FlushModeType.AUTO); for the specific query. If I change the logic | |
Query can't see recently persisted object = oid; } ... } ... TypedQuery query = mem.createNamedQuery("MyObject.findByOid", MyObject.class | |
Why the internal error was thrown?(); TypedQuery q = em.createQuery(query, clazz); q.setHint | |
Query over the keySet of a map field with collection parameter It is possible to execute a query over a keySet of a map field with comparing to a collection parameter? Set values = new HashSet (); values.add("c2"); String query = // "SELECT e " + "FROM " + EntityParent.class.getName() + " e " + "WHERE e.map member of ?1"; TypedQuery q = em.createQuery(query | |
Performance in SELECT statement :state"; TypedQuery query = em.createQuery(strSelect, TestEntity.class); query.setParameter("state | |
Is there any faster select method? SELECT: TypedQuery query = em.createQuery( "SELECT p FROM Point p WHERE p.id = " + element.getId(), Point.class); List points = query.getResultList(); WRITE: em.persist(p); ** the Point class is of the tutorial. I found the above select method is ten times slower | |
java.sql.Date equals comparison not working with CriteriaAPI; TypedQuery query = em.createQuery(q); List | |
Internal exception when updating date filed (TemporalType.DATE); TypedQuery personQuery = entityManager.createQuery | |
Update query bug Some code. Problem in UPDATE query. TypedQuery query = ( TypedQuery ) em.createQuery("SELECT t FROM Person p JOIN p.transports t WHERE p.personalCode = :code"); query.setParameter("code ... ) attributeValue); list.add(temp); TypedQuery query2 = ( TypedQuery ) em.createQuery("UPDATE Person p SET p | |
@FetchGroup in JPA similar to JDO as a hint that this query should return Entities with only those fields filled with data: TypedQuery ... _NAME, "names"); This will be equivalent to query using tuples: TypedQuery query = em.createQuery ... to TypedQuery query = em.createQuery("select new Entity(e.firstName, e.lastName) FROM Entity e", Entity | |
Once served to JSF page via @EJB query bean, many list fields are null (but same query ok after fresh persist in @PostConstruct) testQuery() { String $i = "testQuery"; TypedQuery query = em.createQuery("SELECT e FROM Element e ... ; TypedQuery query = em.createQuery("SELECT e FROM Element e", Element.class);   ... ; String $i = "testQuery"; TypedQuery query = em | |
Online Backup degrades responsiveness. days: try { CoreService.getLogger(this).info("DB Backup Start..."); TypedQuery backupQuery =   ... : EntityManager em = getEM(); try { getLogger(this).info("Backup Start..."); TypedQuery backupQuery ... ; EntityManager em = getEM(); try { getLogger(this).info("Backup Start..."); TypedQuery backupQuery = em | |
InternalException it: TypedQuery q1 = em.createQuery( "SELECT e,g FROM Event e, Guest g WHERE e.calendarId ... retrieval queries worked fine as well: TypedQuery q1 = em.createQuery("SELECT e FROM Event e WHERE e | |
NullPointer on query I'm getting a null pointer when running the following code: TypedQuery query = em.createQuery("SELECT m FROM ObjectDbMessagePayload m WHERE m.id = :id", ObjectDbMessagePayload.class); query ... again with a query TypedQuery query = em.createQuery("SELECT m FROM ObjectDbMessagePayload m WHERE m.id |