The hibernate projection will have to wait
SELECT NAME FROM PRODUCT
Here, the Projection class comes into play. The above query can be rewritten into a Criteria query as:
List products=session.createCriteria(Product.class)
. setProjection(Projection.property(\"name\"))
.list();
No comments:
Post a Comment