ObjectDB Database Search

51-100 of 137 results

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

Cast 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

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

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

Searching lists within objects

).where(pred);         TypedQuery typedQuery = em.createQuery(q);         List results = typedQuery .getResultList();   If I try

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

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

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

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

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

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

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

zip file or JAR manifest missing

the query with TypedQuery : TypedQuery q2 = em.createQuery(sQ2, ItemList.class);   support

Help with 'not like/lower' query

.persistence. TypedQuery ; import javax.persistence.criteria.CriteriaBuilder; import javax.persistence.criteria ... ;   TypedQuery query = em.createQuery(c);         query

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

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

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

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

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

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

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

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

Field in Generic Class not persisted?

.Persistence; import javax.persistence. TypedQuery ; import org.apache.commons.lang3.SerializationUtils ... ;    em.clear();         TypedQuery q = em

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

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

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

Updating Entities

("oldRate: " + oldRate + "\tnewRate: " + newRate); TypedQuery query = Main.paygradeDB.createQuery("SELECT FROM Paygrade ORDER BY rate", Paygrade.class); TypedQuery modifyTo = Main.paygradeDB

Embedded List

this to access it. TypedQuery tqItem = emf.createEntityManager().createNamedQuery("ItemDB.getPart", ItemDB.class ... ();             TypedQuery tqItems = em.createQuery

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

Sorting problem

= null;      TypedQuery icQuery = null;     String q = null

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

Query perfromance problem

; TypedQuery icQuery = null;   if (sortColumn == null) {    icQuery = em.createQuery

ArrayIndexOutOfBoundsException at com.objectdb.o.ALS.c(ALS.java:89)

.toString(arp.spa) + "'" // Get LogEntry's with same IP var query: TypedQuery [LogEntry] = em.createQuery

How to creat a Query with Sql which returns a List marks

(); TypedQuery query = dbConnection.getEm().createQuery( "SELECT m FROM Athlete a, Mark m where a.id

"where in" query

why this result returns an empty set?   List results; TypedQuery prezs = em.createQuery("SELECT p

Online backup problem

;  TypedQuery backupQuery = em.createQuery("objectdb backup", Thread.class);   

ClassCastException of same object type

. Yet the TypedQuery should be returning XCCompetitorCount objects! The add() method

Exception on creation when running multithreaded

also had: typedQuery .setFlushMode(FlushModeType.AUTO); for the specific query.   If I change the logic

Listing large number of complicated objects with paging.

them with paging. The problem is, that running code that looks like this: TypedQuery icQuery = em.em.createQuery

Bulk Delete and Update - best practice?

.getTransaction().begin(); em.persist(data); em.getTransaction().commit(); em.clear(); TypedQuery q = em

Memory leak with OutOfMemoryError exception

; TypedQuery q = em.createQuery("SELECT d FROM DailyEntry d " + "where d.symbol = :symbol

possible index required for improving query performance

; } With the following query: TypedQuery query = em().createQuery( "SELECT r.party FROM Relationship r

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

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

@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

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

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

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

query.getResultList() throws ClassCastException

I modified the example code to include an index on the Point class like so:     @Index(members={"x","y"}) Then when I run the following query:     TypedQuery query = em.createQuery("SELECT p FROM Point p where p.x = :y",         Point