About @Query

api-jdo

addSubquery(sub, variableDeclaration, candidateCollectionExpression, parameters)

Add a subquery to this query.(Method of javax.jdo.Query)

 
forum_thread

How to convert a boolean to an int in the query?

How to convert a boolean to an int in the query? I have five parameters of type boolean in the entity object - approveEmail, approvePhoneNumper, ... I can not sort them ORDER BY approveEmail, approvePhoneNumper, .... because the parameters equivalent. I want to sort them in the query by their sum ORDER BY (approveEmail + approvePhoneNumper + ... ) But I get an exception com.objectdb.o._PersistenceException: Invalid operand type boolean for operator + #1 2013-08-27 12:52 How to convert a boolean to an int in the query? I have five parameters of type boolean in the entity object ...

 
release

2.3.1

Release date: 2011-10-02 Download (5.48 MB) Binary:  objectdb-2.3.1.zip You should start by following a  tutorial or reading the manual ...

 
release

2.3.2

Release date: 2011-10-25 Download (5.48 MB) Binary:  objectdb-2.3.2.zip You should start by following a  tutorial or reading the manual ...

 
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! #1 2015-05-05 11:04 Hello, I have a class as follows: @ Entity public class MyEntity { ...

 
forum_thread

How to query for list of lists ?

Hi, I have a problem with constructing query, that gets only embedded list of integers from Entity. Here's the example : Query query = em.createQuery("SELECT i.filterDescription FROM Inspiration i"); List<List<Integer>> result = query.getResultList(); where Inspiration is like this : #1 2011-11-18 11:05 Hi, I have a problem with constructing query, that gets only embedded list of integers from Entity. Here& ...

 
issue

Error 990 when querying a class with persistence-capable-superclass

[ObjectDB 2.4.7_07] Unexpected exception (Error 990) Generated by Java HotSpot(TM) Server VM 1.7.0_10 (on Linux 3.2.0-39-generic-pae). Please report this error on http://www.objectdb.com/database/issue/new com.objectdb.o.InternalException: null com.objectdb.o.InternalException at com.objectdb.o.InternalException.f(InternalException.java:236) at com.objectdb.o.STA.K(STA.java:339) at com.objectdb.o.ENT.D(ENT.java:533) at com.objectdb.o.ENT.M(ENT.java:681) at com.objectdb.o.LDR.F(LDR.java:589) at com.objectdb.o.LDR.E(LDR.java:466) Bug Version: 2.5.4 Priority: Normal Status: Active Replies: 8 Type:  Bug ...

 
forum_thread

slow performance for a complex query

Hi, We have a query that is constructed dynamically, an example is like this: SELECT DISTINCT $1 FROM CDI $1, Organisation $2, Organisation $3 WHERE ((UPPER($1.cdiId) LIKE 'THREAD14%') AND ((($1.parentOrgId='news') OR (($1.parentOrgId=$2.organisationId) AND ($2.parentOrgId='news'))) OR ((($1.parentOrgId=$3.organisationId) AND ($3.parentOrgId=$2.organisationId)) AND ($2.parentOrgId='news')))) I've also tried running the CDI query first and passing the results into the organisation query as follows: #1 2012-02-16 09:16 Hi, We have a query that is constructed dynamically, an example is like this: SELECT DISTINC ...

 
api-jpa

createQuery(qlString)

Create an instance of Query for executing a Java Persistence query language statement.(Method of javax.persistence.EntityManager)

 
forum_thread

First query takes 4+ minutes to complete

Hi, we are evaluating ObjectDB 2.5.1_04 in embedded mode hoping to replace SQLite in our application. We observed that in our case it takes on average more than 4 minutes to complete the first SELECT query that we run on the DB which contains about 320,000 records of a single type of object. SQLite in comparison responds within few seconds on average with the same number of records. We hope to receive your recommendation on how to improve this result with this post.   Test System #1 2013-08-05 05:44 Hi, we are evaluating ObjectDB 2.5.1_04 in embedded mode hoping to replace SQLite in our application. ...