File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes newbie:select method problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "newbie:select method problem " Watch "newbie:select method problem " New topic
Author

newbie:select method problem

Dio Joestar
Greenhorn

Joined: Jun 29, 2003
Posts: 1
hi,i'm a newbie of ejb
now i wanna select out multi fields just like
the traditional select query:
select field1,field4,field7 from table where.............
i looked it up by google
but i found all the samples r like
SELECT t.fieldX FROM table t (one field)
or
SELECT t FROM table t (all fields)
so,in ejb,how can i select out some of the fields by ejb select method?
thank in advance
John Chandra
Greenhorn

Joined: Jun 27, 2003
Posts: 10
You can not do this using EJB QL since every select query corresponds to a ejbSelect<METHOD>() you define in the entity bean and the return parameter of the ejbSelect<METHOD>() corresponds to the SELECT <FIELD> of the corresponding EJB QL statement.
The best you can do is select all the fields.
Cheers.
 
Don't get me started about those stupid light bulbs.
 
subject: newbie:select method problem