[jboss-user] [JBoss Seam] - Re: count(*) and group by

wschwendt do-not-reply at jboss.com
Tue Jul 24 19:20:32 EDT 2007


While we are at it:

Is COUNT(*) valid anyway, according to JSR 220/EJB Persistence specification V.3.0???

Interestingly, the Seam approach to generate the count query works if the query has no GROUP BY clause. But it doesn't look like a legal EJBQL expression according to the EJBQL BNF grammar.

Is COUNT(*) missing in the JSR 220 specification?




select_clause ::= SELECT [DISTINCT] select_expression {,select_expression}*

select_expression ::=
single_valued_path_expression |
aggregate_expression |
identification_variable |
OBJECT(identification_variable)

aggregate_expression ::=
{ AVG | MAX | MIN | SUM } ([DISTINCT] state_field_path_expression) |
COUNT ([DISTINCT] identification_variable | state_field_path_expression |
single_valued_association_path_expression)

state_field_path_expression ::=
{identification_variable | single_valued_association_path_expression}.state_field


single_valued_association_path_expression ::=
identification_variable.{single_valued_association_field.}* single_valued_association_field

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4067219#4067219

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4067219



More information about the jboss-user mailing list