• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Primitive type can be the return type of the SELECT clause?

 
Alibabra Sanjie
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Primitive type can be the return type of the SELECT clause? like int, long... if the cmp field is a primitive type field?
 
Mikalai Zaikin
Ranch Hand
Posts: 3371
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, it can,
but you can get primitives only in "select" methods, not in "finders"
 
Mikalai Zaikin
Ranch Hand
Posts: 3371
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
here is the example:

The following EJB QL query selects the names of all products that have been ordered. It illustrates the selection of values other than entity beans, therefore it can be used only for SELECT methods, not for FINDER methods:


for details see this page.
cheers !
 
Alibabra Sanjie
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Clear! Thank you, Mikalai Zaikin!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic