About expression

31-40 of 200Refresh
Forum
24

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

Expression> records = root.get(Person_.records); Expression param = builder.parameter ... ... There is no direct query expression for comparing against multiple different fields. Some
Forum
24

IN expression in a Criteria Query

result expression 'a' for an aggregate query at com.objectdb.o.MSG.d(MSG.java:61) at com.objectdb.o ... This is an invalid query. In a grouping query you can only select expressions of the groups, as stated in ... .0, as a result of adding support of IN (literal-list) expressions. Please try build 2.5.0_02
JPA Doc
23

javax.persistence.criteria.Subquery

javax.persistence.criteria Interface Subquery Superinterfaces: AbstractQuery, Expressionexpression as its selection item. Since: JPA 2.0 Selection alias(String ... Returns: selection item Since: JPA 2.0 Expression as(Class type) Perform a typecast
Forum
23

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
Issue
23

@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 681 (JPA JPQL WHERE clause for IN :variable not working if variable is a list
Forum
23

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
Forum
23

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
Issue
22

Issue with TYPE expression in Criteria API

Issue with TYPE expression in Criteria API
JPA Doc
21

Criteria Query Selection and Results

of Expression, any criteria expression can be used as the SELECT clause content. Multiple selection expressions can be represented by CompoundSelection, which is itself a subinterface of Selection ... around Expression, which adds order direction - either ascending (ASC) or descending (DESC
JPA Doc
21

javax.persistence.criteria.CriteriaQuery

to the given entity Since: JPA 2.0 List<Expression> getGroupList() Return a list of the grouping expressions. Return a list of the grouping expressions. Returns empty list if no grouping expressions ... expressions Since: JPA 2.0 Predicate getGroupRestriction() Return the predicate that corresponds