• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JPQL doubt

 
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
in the spec, it clearly says that a path expression in the SELECT clause cannot be composed to get a collection by another path expression. To get a collection, an identification variable must be declared in the FROM clause.

If this is so, then why is the following code correct in one of the enthuware questions:


where, presentations is a collection field in Student !!


the question is in Test 2 of Enthuware.
please help...
 
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you can use aggregate functions, coz it results a scalar, Only when the result can be a collection it is a problem.
 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Vinay Nath:
you can use aggregate functions, coz it results a scalar, Only when the result can be a collection it is a problem.


i have same doubt. i always meet that function 'COUNT' don't accept object complex in parameter function agregate.

how is this?
[ July 19, 2008: Message edited by: Rafael Rocha ]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic