File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes ProjectionList hibernate Criteria Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "ProjectionList hibernate Criteria" Watch "ProjectionList hibernate Criteria" New topic
Author

ProjectionList hibernate Criteria

Sonx Nkuks
Ranch Hand

Joined: Aug 20, 2010
Posts: 47
Hi, am struggling to understand the use of Projections.property... consider the followin



What's the use of it here?
Anantha Sharma
Ranch Hand

Joined: Sep 01, 2010
Posts: 43

Projections.property is used to retrieve specific columns from the datbase using the Criteria API...

ex:


to retrieve only the name & age of the employee i would say


if we run the criteria without the projectionlist added then we would get a query like select id, name, age from Employee.

Hope this helps.


- Anantha Sharma
Sonx Nkuks
Ranch Hand

Joined: Aug 20, 2010
Posts: 47
Anantha Sharma wrote:Projections.property is used to retrieve specific columns from the datbase using the Criteria API...

ex:


to retrieve only the name & age of the employee i would say


if we run the criteria without the projectionlist added then we would get a query like select id, name, age from Employee.

Hope this helps.


- Anantha Sharma


Thanks Anantha
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ProjectionList hibernate Criteria
 
Similar Threads
about inner join and inner join fetch again
Problem with Hibernate Criteria, Projections and associations
why it is inserting the values in the rows again
Retrieve collections using projections
new to hibernate, spring.. criteria queries/joins