aspose file tools*
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


Win a copy of Spring in Action this week in the Spring forum!
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: 17257
    
    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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to select particular column in findAll() method