Answers for "hql return objects"

1

hql return new object from query

return em.createQuery("select new YourClass(yourTable.yourValue, sum(yourTable.yourValueButSum)) from YourTable yourTable " +
                                "where yourTable.yourValue = :value" +
                                " group by yourTable.yourGroup" +
                                " order by yourTable.yourValue desc",
                        Yourclass.class).setParameter("value", value);
Posted by: Guest on August-18-2021

Code answers related to "hql return objects"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language