About query

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

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 ...

 
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

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. ...

 
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

IMK Stall with certain query

Hello, I am experiencing constant IMK Stall notifications from Java when using certain query: 2015-09-01 16:53:15.785 java[3678:5217999] IMK Stall detected, *please Report* your user scenario in <rdar://problem/16792073> - (imkxpc_deadKeyStateWithReply:) block performed very slowly (4.63 secs) i am sure it is linked with objectdb as these are thrown each time one particular query is used: ... Stall notifications from Java when using certain query: 2015 - 09 - 01 16 : 53 : 15.785 java ... with objectdb as these are thrown each time one particular query is used: String param = "%" + begining + "%" ...

 
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

Explorer query functionality

Is there a way in the Explorer to associate JPQL queries with query result windows?  I would really like to be able to open multiple query / result tabbed panes and be able to save out my queries, similar to what you can do in Benthic Golden or Toad in the SQL world. Alternatively are you aware of any other JPA + JPQL workbench tools, commercial or otherwise that would support this? ... there a way in the Explorer to associate JPQL queries with query result windows?  I would really like to be able to open multiple query / result tabbed panes and be able to save out my queries, similar to what ...

 
forum_thread

JPQL query to get entities that does not have a child entity in their child entities

I have 2 tables as shown below. Job Table ID JobId Name StartTime    FinishTime    .... 01 001   A  2105:12:10 14:00:00  2105:12:10 14:00:10 02    002  A  2105:12:10 14:00:00  2105:12:10 14:00:00 03    003  A  2105:12:10 14:00:00  2105:12:10 14:00:00 04    004  A  2105:12:10 14:00:00  2105:12:10 14:00:00 And ... 00 : 00 004 From these 2 tables I have to query for Jobs having states FINISHED, CANCELED, FAILED and ACTIVE. ... = "findFinishedJobsBetweenTimeIntervals" , query = "SELECT J FROM JobEntity J, IN(J.statuses) JS WHERE " + ...