About Criteria API

forum_thread

java.sql.Date equals comparison not working with CriteriaAPI

Hello, Using ODB 2.4.5 and the Criteria API, doing a simple equals comparison with java.sql.Date value doesn't match any results in the database. Our code looks like this: ... Hello, Using ODB 2.4.5 and the Criteria API, doing a simple equals comparison with java.sql.Date value doesn't ...

 
api-jpa

javax.persistence.EntityManager

Interface used to interact with the persistence context.(Interface of JPA)

 
forum_thread

TYPE Expression

Hi there! Trying to add a simple type expression with the criteria api like in your sample: cb.notEqual(e.type(), cb.literal(Country.class)); results in the error: Caused by: com.objectdb.o.UserException: Attempt to store an instance of a non persistable type java.lang.Class at com.objectdb.o.MSG.d(MSG.java:61) at com.objectdb.o.TYW.writeElement(TYW.java:223) at com.objectdb.o.QRR.l(QRR.java:424) at com.objectdb.o.QRR.g(QRR.java:230) at com.objectdb.o.QRR.b(QRR.java:151) ... Trying to add a simple type expression with the criteria api like in your sample: cb. equal ( e. type ( ) ...

 
forum_thread

How to use JOIN FETCH?

The ObjectDB manual (http://www.objectdb.com/java/jpa/query/jpql/from) gives an example of using JOIN FETCH to avoid excessive round trips to the database: #1 2012-08-21 13:41 The ObjectDB manual ( http://www.objectdb.com/java/jpa/query/jpql/from ) gives an example of using JOIN FETCH t ...

 
api-jpa

javax.persistence.criteria.Path

Represents a simple or compound attribute path from a bound type or collection, and is a "primitive" expression.(Interface of JPA)

 
api-jpa

javax.persistence.criteria.Root

A root type in the from clause.(Interface of JPA)

 
manual

ObjectDB Developer's Guide

... applications using ObjectDB and JPA (Java Persistence API). The main purpose of this guide is to make you productive with ObjectDB ... objects. Chapter 4 - JPA Queries (JPQL / Criteria) Explains how to use the JPA Query Language (JPQL). ...

 
forum_thread

migration path from JPA / Hibernate

Hi. Is there a conversion tool or documentation that is of help when migrating an existing JPA solution to ObjectDB? Any recommendations or known pitfalls when it comes to ...   ... ObjectDB website) for exact details. Notice that the JPA 2 criteria query API is now fully supported (relevant documentation will be released in a ...

 
api-jpa

javax.persistence.criteria.Join

A join to an entity, embeddable, or basic type.(Interface of JPA)

 
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: ... such a join variable look like? And how to create it using criteria api? We do have heavy usage of maps so I'd appreciate any ...