Comments on: Example On Hibernate Criteria With Multiple Projections http://www.java4s.com/hibernate/example-on-hibernate-criteria-with-multiple-projections/ Get it YourSelf Mon, 27 Jul 2015 12:56:29 +0000 hourly 1 http://wordpress.org/?v=203 By: srikanth http://www.java4s.com/hibernate/example-on-hibernate-criteria-with-multiple-projections/#comment-3448 Fri, 06 Mar 2015 09:26:11 +0000 http://www.java4s.com/?p=871#comment-3448 I thought, found one bug in this post or i did not understand properly.

In previews example (adding one prjection to criteria) used below statement,
crit.setProjection(Projections.property(“proName”));
i.e, crit.setProjection() with action one Projections object.

Now, again you used same criteria method to add projectionList like below

ProjectionList p1=Projections.projectionList();
p1.add(Projections.property(“proName”));
p1.add(Projections.property(“price”));

crit.setProjection(p1);

p1 is projectionList one projections, so how this crit.setProjection() method accept that,

This is my doubt.

]]>
By: Evyavan http://www.java4s.com/hibernate/example-on-hibernate-criteria-with-multiple-projections/#comment-3140 Mon, 24 Nov 2014 14:44:51 +0000 http://www.java4s.com/?p=871#comment-3140 First of all let me say that the post is a nice one. I am here. shamelessly, to ask for a helping hand. I need to figure out something and if you can and time permits please give me an answer for this question. http://stackoverflow.com/questions/27099693/will-aliastobean-work-when-a-dto-has-a-list-of-another-dto-and-fields-set-with

I am 95% sure this cannot be done how I have coded it, but I sure hope there is a way around. Please excuse my ignorance as I am still learning the ropes of hibernate.

]]>
By: appesh http://www.java4s.com/hibernate/example-on-hibernate-criteria-with-multiple-projections/#comment-2861 Mon, 22 Sep 2014 12:40:16 +0000 http://www.java4s.com/?p=871#comment-2861 Insted of Iterating Object we can type case into Specifed Object eg: p1.add(Projections.property(“price”).setResultTransformer(Transformers.aliasToBean(XXXX.class));

]]>