About JPQL

manual

JPA Named Queries

Explains how to define and how to run JPA named queries.... may improve code organization by separating the JPQL query strings from the Java code. It also enforces the use of query  ...

 
forum_thread

Modifier operations

Hi, Today I was reading about different NoSQL databases. One of those database - MongoDB - has a very nice feature, especially for web applications - modifier operations. The whole trick for those operations is to change some value in object without pulling this object from database. So for example we have class: public class WebVisit { public String url; // key public int visitsCount; } As for now I have to pull this class from database: ... 19:38 You can use a JPQL update query to increase a field value without fetching it: ...

 
forum_thread

Calculating age in query?

Hi! I've got an issue: I have a birthdate as java.sql.Date and a separate field int age. However, of course the age is not accurate because it gets set only once. So what's the best bet (JPA Standard way) to solve the issue of accessing and filtering by an age (having a birthdate) in a query? thanks! Alex ... 16:57 You can use a JPQL query with a simple date comparison: SELECT p FROM Person p ...

 
issue

ObjectDB BIRT Driver Update

The ObjectDB BIRT/ODA driver is an extension of the open source Business Intelligence and Reporting Tools (BIRT) that adds support of ObjectDB as a data source and JPQL as a data set query language. ... (BIRT) that adds support of ObjectDB as a data source and JPQL as a data set query language. In the current implementation ...

 
forum_thread

Spatial queries with ObjectDB

Hello ! Can some-one explain me if it's possible to fill ObjectDB with objects containing Geometric-properties and howto execute spatial queries on them? Or: maybe there's an extension I've missed (like HibernateSpatial for Hibernate) ? Thanks!   ... in queries to provide your own spatial extension to JPQL. Obviously this is not a complete solution but it could be considered for ...

 
api-jpa

getFirstResult()

The position of the first result the query object was set to retrieve.(Method of javax.persistence.Query)

 
forum_thread

CriteriaQuery .where() for multiple conditions

When using the below, there appears to be an OR condition:   ... fine. You may also check the result query string (JPQL) by toString() on the criteria query. ...

 
issue

Different behavior for casting and not casting

Hi, Please use attached db for testing the queries. Query #1 which works and selects a few entities: SELECT DISTINCT $1 FROM com.lexware.vereinsverwaltung.verein.mitglied.Mitglied $1 WHERE $1.qubletFRAGMENTMAP.get('com.lexware.vereinsverwaltung.abrechnung.api.model.mitglied.MitgliedVertraegeFragment') IS NOT NULL Query #2 which is equal to the previous one though includes a casting and returns NO entities: ... in casting was broken. Since casting in not part of JPQL and rarely used I am afraid it might not be the last problem that you ...

 
forum_thread

Entity with java.util.Date column gives ClassCastException in BIRT

Copied a straightforward entity class from my coleague. Using Eclipse Kepler (Reporting) and stored it in ObjectDB 2.5.3_02. After creating an ObjectDB BIRT DataSource and a DataSet, entered a simple JPQL query to select the fields. Entity looks like this: ... ObjectDB BIRT DataSource and a DataSet, entered a simple JPQL query to select the fields. Entity looks like this: package ...

 
forum_thread

selecting objects that have a particular key/value in persistant HashMap

Hi, First post here and exploring ObjectDB.  I have an class Person which has a HashMap<String, String> called 'pMap' as a persistable field.  I am able to create Person objects and persist them as expected. ... = 'California' This is not a valid JPQL query but an extension that ObjectDB should support. If you need a ...