*
The moose likes EJB and other Java EE Technologies and the fly likes How to select particular column in findAll() method 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 "How to select particular column in findAll() method" Watch "How to select particular column in findAll() method" New topic
Author

How to select particular column in findAll() method

Balachandran Vijayarajan
Greenhorn

Joined: Jun 23, 2005
Posts: 29
Hi All,

Its possible to select particular column in EJB QL in findAll() method. For example "select a.firstName,a.userId,a.lastName from EntitlementUserBean a" - here "EntitlementUserBean" entity bean name.


Thanks a lot,

Bala
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

No, because those are what is called Projection Queries, so in that case, then there would be no way to determine what type of object to create. In EJBs for Entity beans, it has to bring back all the fields of the entity beans populated. Now in EJB 3.0 and JPA, you can create project querires that create other types of objects that aren't entity beans.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
Don't get me started about those stupid light bulbs.
 
subject: How to select particular column in findAll() method
 
Similar Threads
New to EJBs
ejb/jboss-ql finder woes.
How to reRender a particular column in a row of a h:dataTable
How do display the contents of List<>
ejbql-jboss problem