About in

forum_thread

JPQL IN Operator

How can I use the standard JPQL IN operator with ObjectDB? This JPQL query works fine with EclipseLink / postgres but throws an exception in objectDB: select distinct dv.creationtime from DataValue dv where dv.capabilityId.capabilityId ==> in <== :capabilities and dv.creationtime >= :earliest and dv.creationtime <= :latest order by dv.creationtime ASC [ObjectDB 2.2.9] javax.persistence.PersistenceException Unexpected query token 'in' (error 752) ... How can I use the standard JPQL IN operator with ObjectDB? This JPQL query works fine with EclipseLink / postgres but throws an exception in objectDB: SELECT DISTINCT dv . creationtime FROM ...

 
forum_thread

Help with 'not like/lower' query

Hi again,   Honestly, I'm fairly new with JPA2 Criteria queries - but as far as code effort goes, it has saved me a bit of pain. I'm writing a dynamic query builder (only 1 level deep for basic entities) - but  even though I get most queries to work, I am getting the following error. This is using Criteria with a combination of LOWER/UPPER - NOT LIKE: ... $1 . email ) NOT LIKE :p2 So in essence, I'm trying to do a count (with a subsequent fetch of a page of ... excerpt of my visitor class for handling String properties in entities): ParameterExpression<String> stringProp = ...

 
issue

Error reading UTF string (Serialized Objects in Explorer)

This is the message I get for attached db and this query: ... There is a problem in retrieval of the BeitragVertragArt instance (with qubletID = 371). Trying to view all the instances of this type in the explorer (by right clicking the type in the Schema tab and selecting ...

 
manual

[ODB1] Chapter 8 - ObjectDB Server

An ObjectDB server can manage one or more databases. Databases that are managed by a server can be accessed by multiple processes simultaneously. In addition, the server supports accessing these databases from remote machines by TCP/IP. More details about client server mode vs. embedded database mode are discussed in Section 1.2.... can be accessed by multiple processes simultaneously. In addition, the server supports accessing these databases from remote machines ... server mode vs. embedded database mode are discussed in Section 1.2 . Because the JDO API and the format of the database file are ...

 
forum_thread

Query in JPA2 with LEFT JOIN on INNER JOIN

select a.description, a.id, p1.description, p2.description,p3.description from action a left join action_profile ap1 on ap1.id_action=a.id inner join profile p1 on  ap1.id_profile=p1.id  and p1.name='?' left join action_profile ap2 on ap2.id_action=a.id inner join profile p2 on  ap2.id_profile=p2.id  and p2.name='?' where a.id =?;   Thanks   ... How write a query in JPA2 with LEFT JOIN on INNER JOIN? SELECT a . description , ... The syntax of using JOIN in explained on this manual page . Using ON in a  JOIN ...

 
forum_thread

Optimistic locking: prevent version increment on entity collection attribute

Hello, I have an entity E with an attribute which is a collection of entities (one to many relationship) with an optimistic locking strategy supported by a version field. Is it possible to prevent the increment of the version of entity E when entities are added to or removed from the collection? Something like the equivalent of @OptimisticLock(excluded=true) in Hibernate? Thanks, Farid ... like the equivalent of @OptimisticLock(excluded=true) in Hibernate? Thanks, Farid ... a bidirectional relationship that is owned by the entities in the collection (i.e. the collection is defined as a mapped by) then adding ...

 
forum_thread

How to package orm.xml when using EJB in WAR?

Hi, I have database utility classes in one project, the id's use sequences declared in an orm.xml file for example: ... Hi, I have database utility classes in one project, the id's use sequences declared in an orm.xml file for example: < entity class = ... both persistence.xml and orm.xml are located in src/main/resources/META-INF and Maven correctly copies META-INF and all ...

 
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 + ... How to convert a boolean to an int in the query? I have five parameters of type boolean in the entity object - approveEmail, approvePhoneNumber, ... I can not ...

 
manual

ORDER BY clause (JPQL / Criteria API)

Explains how to use the ORDER BY clause in a JPA/JPQL query.... that does not include an ORDER BY clause produces results in an undefined and non-deterministic order. This page covers the ... Grouping (GROUP BY) Order ORDER BY in Criteria Queries ORDER BY Expressions The ...

 
forum_thread

How the sort order (in queries) works for non english letters?

We are considering using ObjectDB in  project where target audience are czech speaking people (we are Czech company). How the sort order works for international (for us 'czech') letters? Does the ordering respects the national requirements? Thank you for clarification ... ... We are considering using ObjectDB in  project where target audience are czech speaking people (we are Czech ... order, which is based on the order of the characters in Unicode. In Unicode, ordinary English letters are located separated from ...