About query

issue

ClassCastException thrown when running count query

Hello! Attached you find a full stacktrace. The query was: ... Attached you find a full stacktrace. The query was: SELECT COUNT ( t ) FROM Position t WHERE ( ... Index definition for the fields in the query. Log of the query execution using DEBUG logging level. ...

 
forum_thread

Performance issues on aggregate query

we are using this aggregate query to collect some data: ... we are using this aggregate query to collect some data: select ... No the problem is the following: when we query objects that have no objects linked into the relationship ObjectNode.childNodes the query takes around 1 second. when we query objects that have typically ...

 
api-jpa

setHint(hintName, value)

Set a query property or hint.(Method of javax.persistence.Query)

 
forum_thread

Calendar in Criteria Querys

Hi, i am having troubles creating criteria querys for Calendar objects. As far as I can see CriteriaBuilder has no methods for checking if one Calendar is bevor or after another. Javas Calendar Class got such methods, but i dont know how to use those in my query. ... got such methods, but i dont know how to use those in my query. edit ... ) ) ;   CriteriaQuery query = cb. createQuery ( ) ; e = query. ...

 
issue

JPA Query Criteria API (JPA 2.0)

The JPA Criteria API supports dynamic definition of JPQL queries using CriteriaBuilder as a factory. ObjectDB supports dynamic definition of JPQL queries as strings and expected to support also the new JPA 2 Criteria API in future versions.  ...   Implementation of the JPA Criteria Query API was just added to ObjectDB in version 2.1.1_01. It will ... was just released with full support of the JPA Criteria Query API , including complete test coverage and documentation . ...

 
forum_thread

Debuging query before execution

Hi, Is is possible in any way to get string representation of a query right before execution, after setting parameters? Of course it's easy to print out query string when we build it by concatenating many strings, but even then we miss attributes. ... is possible in any way to get string representation of a query right before execution, after setting parameters? Of course it's easy to print out query string when we build it by concatenating many strings, but even then we ...

 
issue

InternalException when querying indexed field using a list that contains duplicates

ObjectDB is throwing an InternalException in JdoQuery: ... This happens in the specific case when: A query filter like this is used: ":ids.contains(originalId)" ... contain duplicates, the exception is not thrown and the query produces the expected results. An easy workaround is to copy the ...

 
forum_thread

Query fails with numerical values > 2^31

Hi ! I'm trying to execute the following query (from Java-code, also tried ObjectDB Explorer) delete from DataRecord p where p.TimeOfDeletion < 4147483648 This fails with "invalid numerical literal". The field p.TimeOfDeletion is of type long. As far as I know, the maximum value greater than 2^31 (Oracle: "The long data type is a 64-bit two's complement integer.") ... Hi ! I'm trying to execute the following query (from Java-code, also tried ObjectDB Explorer) DELETE FROM ... the online help (e.g. http://www.objectdb.com/java/jpa/query/jpql/delete#Selective_Deletion_ ) ? Thanks for your quick ...

 
forum_thread

wrong query result

Hi we have a problem with queries, database is returning wrong results. These are the queries we run from ObjectDB explorer. ... are the queries we run from ObjectDB explorer. Query 1 - SELECT MAX(e.generisaniID) FROM AktImpl e – returns string ... although field generisaniID is of type long. Query 2 - select e.idRecord, e.generisaniID from AktImpl e- returns string ... long. Retuned value from field idRecord is correct. Query 3 SELECT e FROM AktImpl e – returns correct results We had this ...

 
forum_thread

Efficient query on EmbeddedId

Hi! I have an entity class with an @EmbeddedId (field1 int and field2 int). Based on the manual, I understand that making a query just on entity.id.field1 is efficient. Of course, making a query containing the whole EmbeddedId is the ideal case, and I use it, but I need more use cases. ... int). Based on the manual, I understand that making a query just on entity.id.field1 is efficient. Of course, making a query containing the whole EmbeddedId is the ideal case, and I use it, but I ...