Meaningless Drivel is fun!
The moose likes EJB and other Java EE Technologies and the fly likes Multiple column selection using EJB-QL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Multiple column selection using EJB-QL " Watch "Multiple column selection using EJB-QL " New topic

Multiple column selection using EJB-QL

Vivek Mathur

Joined: Jun 29, 2007
Posts: 25

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

Joined: May 26, 2003
Posts: 33124

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.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
I agree. Here's the link:
subject: Multiple column selection using EJB-QL
jQuery in Action, 3rd edition