JPQL constructor_expression followed by an aggregate_expression in select_clause not
supported
----------------------------------------------------------------------------------------------
Key: HHH-3082
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3082
Project: Hibernate3
Issue Type: Bug
Components: core
Affects Versions: 3.2.5
Reporter: Bob Tiernay
From the JPA spec:
select_statement ::= select_clause from_clause [where_clause] [groupby_clause]
[having_clause] [orderby_clause]
select_clause ::= SELECT [DISTINCT] select_expression {, select_expression}*
select_expression ::= single_valued_path_expression | aggregate_expression |
identification_variable | OBJECT(identification_variable)| constructor_expression
constructor_expression ::= NEW constructor_name( constructor_item {, constructor_item}*)
Expanding the production rules confirms that select_clause should support both a
constructor_expression and an aggregate_expression in sequence. For example:
SELECT NEW package.DTO(e.f), COUNT(e) FROM Entity e WHERE ...
However, doing so indicates a grammar error in the "," prior to the aggregate
expression.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira