1 Reply Latest reply on Nov 17, 2005 7:18 AM by Emmanuel Bernard

    EJB QL select clause: possible to mix constructor_expression

    Johannes Huber Newbie

      The specification of the select clause is defined to:

      select_clause ::= SELECT [DISTINCT] select_expression {, select_expression}*
      select_expression ::=
      single_valued_path_expression |
      aggregate_select_expression |
      identification_variable |
      OBJECT(identification_variable) |
      constructor_expression ::=
      NEW constructor_name ( constructor_item {, constructor_item}* )

      I tried to mix a constructor_expression with single_valued_path_expressions, but it did'nt work:
      "Select c.first, c.last, new org.jboss.tutorial.merge.bean.CustomerAdress(c.street, c.city, c.state, c.zip) from Customer c where c.last = :name"

      According to the EBNF of EJBQL it should be possible to mix constructor_expressions with other forms of select_expressions.

      Is it a bug or intention, that the query above doesn't work?