About getResultList

forum_thread

Using Enum type in NamedQuery: Field is not found in type

I'm trying to switch an application that worked fine in Hibernate to ObjectDB and am having issues with queries that reference enum types. On my entity object is a static enum public static enum Type {     A,B,C } that is stored in an @Enumerated member variable private Type type; @Enumerated public Type getType() {     return type; } I then try to query this field in the following JPA Named Query ... query ) ; List resultList = query. getResultList ( ) ; System. out . println ...

 
forum_thread

New to Product & Having An Issue

Greetings ObjectDB Users! I'm new to the product, and I've setup a simple test after reading the tutorial, and I'm running into some issues with queries, specifically querying by primary key.   I have a domain object class Called Department, which has a member of type DomainId.  DomainId has two member fields:  String accountId and String objectId.  The following code shows these two classes.... do { departments = q. getResultList ( ) ; em. getTransaction ...

 
forum_thread

java 8 LocalDateTime is not working in query

My entity class has a field of type java.time.LocalDateTime. I'm able to persist entities and I'm able to query without datetime field in where clause, but with datetime in where clause doesn't return anything and not exception.   ... ; List<MyEntity> resultList = query. getResultList ( ) ; System. out . println ...

 
forum_thread

Problems down-casting in WHERE clause

I have a family of related types, like this: @Entity class Base { String val1; String val2; }; @Entity class Derived1 extends Base { String val3; }; @Entity class Derived2 extends Base { String val4; };  I'm trying to implement a query which will return all Base objects which have a given string within any of their String-typed fields.  The query I'm using looks somewhat like this: ... ( "search" , "" ) ; query. getResultList ( ) ; em. close ( ) ...

 
issue

Weird issue with variable naming

hi, ... println ( em. createQuery ( cq ) . getResultList ( ) ) ;   em. close ( ...

 
issue

Super class' field access fails

I have a base class: public abstract class HotObject extends BaseObject {   private Integer activity;   protected HotObject() {     activity = 1;   }   public Integer getActivity() {     return activity;   }   public void setActivity(Integer activity) {     this.activity = activity;   } ... "SELECT b FROM B b ORDER BY b.x DESC" ) . getResultList ( ) ;   em. close ( ...

 
forum_thread

Why the internal error was thrown?

com.objectdb.o.InternalException at com.objectdb.o.CCH.H(CCH.java:298) at com.objectdb.o.CCH.E(CCH.java:155) at com.objectdb.o.QRM.Vo(QRM.java:226) at com.objectdb.o.MST.Vo(MST.java:988) at com.objectdb.o.WRA.Vo(WRA.java:311) at com.objectdb.o.WSM.Vo(WSM.java:115) at com.objectdb.o.QRR.g(QRR.java:247) at com.objectdb.o.QRR.f(QRR.java:153) at com.objectdb.jpa.JpaQuery.getResultList(JpaQuery.java:719) ... com.objectdb.jpa.JpaQuery.getResultList(JpaQuery.java:719) ... com.objectdb.jpa.JpaQuery.getResultList(JpaQuery.java:719) at ... , "LAZY" ) ; return q. getResultList ( ) ; } ...

 
forum_thread

Memory consumption of empty Strings

After doing some memory related research in my program, I found a possible place for an enhancement of objectdb: My program has several entities which contain many String. Often some of these String are empty (""). To avoid unnecessary memory consumption, the String within the entities are initialized like: String firstName = ""; ... class ) ; entities = query. getResultList ( ) ;   entityManager. close ...

 
issue

Null pointer exception being thrown from within ObjectDB.

EXCEPTION/DESCRIPTION:... com.objectdb.jpa.JpaQuery.getResultList(JpaQuery.java:719) at ... query. setMaxResults ( maxRecords ) . getResultList ( ) ;</ span ></ span > ... ...

 
issue

Issue with TYPE expression in Criteria API

Find attached project using latest 2.3.4_03 odb still causes:   ... java.lang.Class (error 303) at com.objectdb.jpa.JpaQuery.getResultList(JpaQuery.java:675) at com.test.TestRun.test01(TestRun.java:68) at ... com.objectdb.jpa.JpaQuery.getResultList(JpaQuery.java:666) ... 2 more ... resultList = em. createQuery ( cq ) . getResultList ( ) ; System. out . println ...