cancel
Showing results for 
Search instead for 
Did you mean: 

Is SAP Netweaver 7.0 (2004s) support EJBQL "COUNT"

Former Member
0 Kudos

I encountered problem when trying to create an ejbql which contain "count" function with SAP Netweaver Developer studio. I have checked the option of "Query uses EJB-QL 2.1 enhancements (e.g. ORDER BY)".

The allowed return type of the ejbql is java.lang.String or java.util.Collection but I expect a return type of java.lang.Integer.

Anyone know how to solve this?

Accepted Solutions (0)

Answers (1)

Answers (1)

Vlado
Advisor
Advisor
0 Kudos

Hi Kenneth,

What do you mean by "return type of the ejbql"? Are you referring to the return type of the method for which this EJBQL query is defined?

Is it a finder or a select method? Please note that aggregate functions can be used only with select methods. In the case of a finder method, the SELECT clause is restricted to contain either a single range variable or a single-valued path expression that evaluates to the abstract schema type of the entity bean for which the finder method is defined.

HTH!

\-- Vladimir