About expression

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 + ... = c. get ( "capital" ) ; Expression<Integer> intCaptial = boolCaptial. as ( Integer. ... c. get ( "approveEmail" ) ; Expression<Integer> intApproveEmail = boolApproveEmail. as ( ...

 
forum_thread

Sorting problem

Hi, I was rewriting our DAO to support pagging in large dataset and I think I have found a problem with sorting. I send you a test case - sorry for using the same project as previous, but it was faster to write this test case. As usual, you can load data with DataLoader and then check problem with QueryData. There is a simple query with "order by" sentence: ... query the results were sorted but by using a constant expression ( "br.id" is considered as a string literal value rather than as a navigation expression), and because this constant expression is the same for all the ...

 
issue

Issue with UPPER ?

Hi, Assuming those queries which are all the same except the UPPER calls: ... 8a: Handle a constant expression ------------------------------------ [Step 8a1] If ... ($4) instances. Step 8a3: Handle a constant expression ------------------------------------ [Step 8a3a] If ($3!=null) is ...

 
manual

Query Parameters in JPA

Explains how to use parameters (named parameters and ordinal parameters) in JPA queries.... Reference Page... can be chained to the same expression. Named parameters can be easily identified in a query string ...

 
forum_thread

Problem with Criteria Querys

Hi, i am having problems running following code...   ... Unresolved compilation problems: The method gt(Expression<? extends Number>, Expression<? extends Number>) in the type CriteriaBuilder is not ... ParameterExpression<Double>) The method lt(Expression<? extends Number>, Expression<? extends Number>) in the ...

 
api-jdo

addSubquery(sub, variableDeclaration, candidateCollectionExpression, parameters)

Add a subquery to this query.(Method of javax.jdo.Query)

 
release

2.7.3

... Fixed a bug in ordering query result by an expression that is used in IN operator. Fixed a bug in handling ... relationships. Fixed a bug in using IN expression in criteria queries . Fixed processing an ...

 
release

2.7.3_01

... Fixed a bug in ordering query result by an expression that is used in IN operator. Fixed a bug in handling ... relationships. Fixed a bug in using IN expression in criteria queries . Fixed processing an ...

 
api-jdo

addSubquery(sub, variableDeclaration, candidateCollectionExpression, parameters)

Add a subquery to this query.(Method of javax.jdo.Query)

 
release

2.7.2

... Fixed a bug in ordering query result by an expression that is used in IN operator. Fixed a bug in handling ... relationships. Fixed a bug in using IN expression in criteria queries . Fixed processing an ...