About named queries

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

Different behavior for two equal queries

Hi, I've got two equal queries though they behave differently: SELECT FROM com.quasado.foundation.communication.contact.individual.IndividualContact $1 WHERE (($1.organisation.name LIKE '%Q%')) This correctly returns one entry from my database ... Hi, I've got two equal queries though they behave differently: SELECT FROM com . ...

 
forum_thread

JPA query of a Set of terms

Hi, Is it possible to write a JPA query to select objects that contain a collection of elements? For example, suppose I have a table that maps a search terms to pages: @Entity public class SearchIndex { @Index SearchTerm term; @Index Page page; } Now suppose I have an array of SearchTerm objects. ie. ... per term. See also the document and words sample queries in the manual. ObjectDB Support ...

 
api-jpa

JPA Annotations for JPQL Queries

Reference (JavaDoc) of JPA 2 query annotations, including @NamedQueries, @NamedQuery and @QueryHint. The following annotations are used to define static named JPA queries: javax.persistence.NamedQueries ... javax.persistence.QueryHint The JPA Named Queries section of the ObjectDB Manual explains and demonstrates how to ...

 
forum_thread

Using the wrong class to access a database

Hello, just starting to test ObjectDB and ran into a problem. I've created a small program to test the Point database described in the Getting Started section: ... This second app makes some queries and should not change the content of the db - but it does: The first 2 queries are working fine, but the third ruins the database: - The ... ok), then - why is no exception thrown in the queries? - why the db is getting messed up with the third query - even if ...

 
forum_thread

Exception when querying Map property with @embedded & Enhancer enabled

Hi, I have the following test class that is failing when the enhancer is enabled, resulting in the error 'Failed to write the value of field field TestEmbeddableMap$MyAttributeItem.id using enhanced method.', if I disable the enhancement the test works as expected, and returns the expected MyEntity2 Thanks   ... System. out . println ( "Queries on attributes, should return entity1" ) ; for ... an unexpected limitation of enhanced embeddable classes in queries. Please try build 2.6.4_06 that should fix this issue. ...

 
release

2.3.6

... performance of collection and map size evaluation in queries. Fixed a critical bug in page caching (issues #116 , ... Added support of DATE(...) and TIME(...) methods in queries. Added new Explorer and Server exe (for Windows 7 and ...

 
forum_thread

"where in" query

Is it possible to run a query selecting values that exist in a provided list? e.g. something like: SELECT u FROM User m WHERE u.username IN ('test_user','anotheruser') I've tried various combinations of this including passing the list as a named parameter but without any joy. The only similar examples I can find in the docs involve a join query - but my list isn't in the database - and the MEMBER OF operator doesn't seem to do what I want (although I may be using it incorrectly! ... combinations of this including passing the list as a named parameter but without any joy (error below). The only similar examples I ...

 
release

2.3.0

... issue #1 ). Added the ability to execute queries in the Explorer (issue #2 ). Other small Explorer ... Added support of IN operator in JPQL queries. Added support of ";drop" database url parameter. ...

 
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 ... a transaction. 2. The 2nd EntityManager runs the queries (JPQL SELECT statements) shown next.  Query We ...