About getResultList

forum_thread

Query by array element

Hello, I have a class as follows: @Entity public class MyEntity {     boolean properties[]= new boolean[1024]; } I would like to query objects with feature '42': select me from MyEntity me where me.properties[42]=true Is it possible? Thank you! ... System. out . println ( query. getResultList ( ) . size ( ) ) ; ...

 
tutorial

Step 3: Add a Main Class

Explains how to add the JPA tutorial Main class in NetBeans.... ; List<Point> results = query. getResultList ( ) ; for ( Point p : ...

 
forum_thread

Restrict by class in query

I have the following bit of code: ... setParameter ( "name" , folderName ) . getResultList ( ) ; } I would have assumed ...

 
forum_thread

Empty query results after JAR creation

Hi, I struggle with a strange issue. I've embedded ObjectDB in a small application to query cases. Within Netbeans everything works fine but when I create a  JAR File and executed via "Java -Jar xyz.jar", I get either empty results or on some cases a "NoResultException" which appears to report the same issue. I've created a small test case (attached zip file) with sample DB to reproduce the issue.  ... ;   List<Case> allCases = q. getResultList ( ) ;   for ( Case c1 : ...

 
forum_thread

java.lang.UnsupportedOperationException

com.objectdb.o.InternalException: java.lang.UnsupportedOperationException: Unsupported feature - Update queries are not supported yet java.lang.UnsupportedOperationException: Unsupported feature - Update queries are not supported yet. Used with this code: "DELETE l FROM License l WHERE l.id = ?1", License.class); query.setParameter(1, id); int changes = query.executeUpdate(); Is there a workaround? ... is to use remove : List results = query. getResultList ( ) ; em. getTransaction ( ) . ...

 
forum_thread

java.lang.ClassCastException in query results

I have a simple object stored in a ObjectDb file Stadium Name (java.lang.String) Capacity (int) City (java.lang.String)   When i run the following code i get the ClassCastException in the "for (Stadium result : results)" line ... ) ; List<Stadium> results = query. getResultList ( ) ; for ( Stadium result : ...

 
forum_thread

How to do multithreading with embedded ObjectDB

Hi, I've tried to implement a counter with ObjectDB, but the following code doesn't work as expected: ... ; List<Point> results = myquery. getResultList ( ) ; System. out . println ...

 
forum_thread

com.objectdb.o.InternalException: Unexpected internal exception

Hi, I am using objectdb.jar version 2.6.8 (installed via Maven). I am trying to authenticate a user. Initially, the database is empty. I have the following query: @javax.persistence.NamedQuery(   name = "getPersonByName",   query = "SELECT _person FROM metamodel.user.Person as _person WHERE _person.userName = :userName" ) I execute the query as follows: ... . setParameter ( "userName" , name ) . getResultList ( ) ; I get the following exception: ... at com.objectdb.jpa.JpaQuery.getResultList(JpaQuery.java:728) at ... at com.objectdb.jpa.JpaQuery.getResultList(JpaQuery.java:719) ... 115 more Can you please ...

 
forum_thread

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

Hi all, I have created a packet grabber using JNetPcap. It creates a scala actor (java thread) for every packet grabbed which connect to an OpenDB database to add or update relevant entry's. Everything works fine until packets arrive with a time difference in the order of microseconds. Every scala actor opens a connection to the database, does what it needs to do, and then closes the connection. Something like: ... . Seq [ LogEntry ] = query. getResultList . asScala // Convert to scala collection // Check stuff ...

 
forum_thread

Error: Failed to write value of field X using reflection (oneToMany relation)

Hi there! I have been all day trying to solve this. I have read multiple sites and documentation, but I can go through this. I have a clase named Pedido, that have a reference ManyToOne to a clase Cliente. ... class ) ; results = query. getResultList ( ) ; } finally { ...