Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EJB QL question

 
Jim Janssens
Ranch Hand
Posts: 210
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it correct that the 'as' identifier is optional in every ejb query ?

For example;

"Select Object(o) from Order o" is the same as "Select Object(o) from Order as o"
 
Wei-ju Wu
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes:

EJB 2.0 Specification, 11.2.6:

from_clause ::= FROM identification_variable_declaration
[, identification_variable_declaration]*
identification_variable_declaration ::= collection_member_declaration |
range_variable_declaration
collection_member_declaration ::= IN (collection_valued_path_expression) [AS] identifier
range_variable_declaration :: abstract_schema_name [AS] identifier

Note especially the definition for range_varialbe_declaration.

Wei-ju
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic