About named queries

forum_thread

Entity has be persistended,but query not fetched?

I create a new entity T newT and persistend it,then I create a query "select t from T t" to fetch all T entities.But  then the newT is not contain in the query result. Why? #1 2011-04-24 01:51 I create a new entity T newT and persistend it,then I create a query "select t from T t" to fetch all T entities. ...

 
forum_thread

Optimization of Map Queries

hi! I am having loads and loads of occurrences of something like ((com.test.MyEntity) $1.map.get('com.test.MyEntity')).someProperty ... ((com.test.MyEntity) $1.map.get('com.test.MyEntity')).someOtherProperty .. ((com.test.MyEntity) $1.map.get('com.test.MyEntity')).someMoreProperties I need to use full qualified names for casting as well as for the map keys because same entity simple names may occur multiple times. Now I've got two questions: ... implementation of the  Map 's get method in queries is not very efficient, and in addition the result is not reused but ... extension, so it might not be available in criteria queries. Maps are indeed commonly used by ObjectDB users, but mainly ...

 
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: ... cannot help). There are different types of nested queries. Some nested queries are actually equivalent to JOIN. When the inner query is not dependent ...

 
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! ... query is not supported since you cannot access arrays in queries. You can implement a method in MyEntity that wraps the ...

 
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 + ... . Currently you cannot convert boolean to int in queries. It is possible to add this to ObjectDB in future versions, but using a ... I downloaded version 2.5.2_04. but in the Explorer queries SELECT approveEmail FROM Person ORDER BY ( ...

 
release

2.3.1

... a ClassCastException in using a composite index in queries ( issue #71 ). Fixed handling derived Id fields in ... issue #1 ). Added the ability to execute queries in the Explorer (issue #2 ). Other small Explorer ...

 
release

2.3.3

... Improved compilation performance of OR queries with many elements. Fixed eager fetch of maps and nested ... 2.3.2 Fixed a bug in "p.id IN :ids" queries. Fixed a bug in handling NOT =  queries ( issue ...

 
release

2.3.4

... Fixed performance issue ( fetch optimization ) in range queries. Fixed cached result size evaluation to include query ... #91 ). Fixed a bug in using IS NULL in queries on new fields after schema change. Fixed an Explorer bug ...

 
release

2.3.2

... 2.3.2 Fixed a bug in "p.id IN :ids" queries. Fixed a bug in handling NOT =  queries ( issue #77 ). Fixed ClassCastException and ...

 
api-jpa

setParameter(name, value, temporalType)

Bind an instance of java.util.Date to a named parameter.(Method of javax.persistence.Query)