This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Multiple column selection using EJB-QL

 
Vivek Mathur
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I want to select multiple columns through EJB-QL, but whenever i write that
it gives an exception saying it was expecting 'from' instead of ','.
EJB-QL is like as follows:

select m1.code, m1.text from DROP_VALUE m1 where lang=?1

Home method for this is having return type as 'Collection'

Can you please tell can we select multiple columns at a time or not throgh EJB-QL and if yes, then how todo that.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34178
340
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vivek,
This thread implies that it should be possible.

I haven't tried it though and would recommend just returning m1 (the whole entity) if you having problems.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic