ObjectDB ObjectDB

Internal Website Search

31-40 of 200 resultsRefresh
41

"Unexpected query expression" using CriteriaQuery FetchParent Interface

: Unexpected query expression end (non keyword identifier is expected)] with root cause com.objectdb.o.UserException: Unexpected query expression end (non keyword identifier is expected) at com.objectdb.o ... "main" [ObjectDB 2.5.6_05] javax.persistence.PersistenceException Unexpected query expression end
41

IN expression in a Criteria Query

.objectdb.o.UserException: Invalid result expression 'a' for an aggregate query at com.objectdb.o.MSG ... you can only select expressions of the groups, as stated in the manual: The SELECT clause can only use properties ... version 2.5.0, as a result of adding support of IN (literal-list) expressions. Please try build 2.5.0
41

JPA CriteriaQuery -- Iterate Expression<List<Object>>

(String) of each element of the List of Records (see pseudo code). //using MetaModel Expression<List<Records>> records = root.get(Person_.records); Expression<String> param = builder.parameter ... ... toriacht Walter R There is no direct query expression for comparing against multiple different fields
40

Possible issue for JPQL IN expression

Possible issue for JPQL IN expression with a set of more than one string literals values in the path expression. Error: Exception in thread "main" [ObjectDB 2.3.7_10] SELECT e FROM MyEntity e WHERE e.country IN ('US' ==> , <== 'SP', 'UK') javax.persistence.PersistenceException Unexpected query
40

TYPE Expression

Hi there! Trying to add a simple type expression with the criteria api like in your sample: cb.equal(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
40

Possible issue for JPQL IS EMPTY expression

Possible issue for JPQL IS EMPTY comparison expression: SELECT e FROM MyEntity e WHERE e.collection-valued IS EMPTY throws javax.persistence.PersistenceException: Invalid operand type for operator IS EMPTY (error 756) Thanks. Note: It doesn' t work with SIZE(): SELECT e FROM MyEntity e WHERE SIZE(e
9

JPA Annotations for Value Generation

Automatically generated values are mainly useful for primary key fields, but are supported by ObjectDB also for regular (non primary key) persistent fields. At the field level, the @GeneratedValue with an optional GenerationType strategy is specified: The @GeneratedValue annotation
8

Collections in JPQL and Criteria Queries

. as path expressions - in navigation to persistent collection fields. IS [NOT] EMPTY The IS [NOT ... Expressions JPQL collection operators and functions (which are described above) are available also as JPA criteria query expressions. The CriteriaBuilder interface provides factory methods for building
8

javax.persistence.criteria.Subquery

javax.persistence.criteria Interface Subquery<T> Superinterfaces: AbstractQuery<T>, Expression<T ... to subqueries. A subquery has an expression as its selection item. Since: JPA 2.0 Selection<X> alias(String ... Returns: selection item Since: JPA 2.0 Expression<X> as(Class<X> type) Perform a typecast
8

@Enumerated(EnumType.STRING) annotation inhibits proper execution of IN expressions.

When the following annotation is present on an enum type entity field: @Enumerated(EnumType.STRING) Queries using JPQL IN expressions on this field won't work correctly anymore. This issue has been described in forum post 1254 (JPA JPQL WHERE clause for IN :variable not working if variable

Getting Started

ObjectDB is very easy to use. Follow the Getting Started Tutorial and the Quick Tour manual chapter and in minutes you may be able to write and run first Java programs against ObjectDB.

Prior knowledge or experience in database programming (SQL, JDBC, ORM, JPA, etc.) is not required, but some background in using the Java language is essential.

Need Help?

  1. Search ObjectDB website
  2. Read the FAQ
  3. Follow the Tutorials
  4. View or post in the forum
  5. Search or file an issue
  6. Contact support