Answers for "hql return new object from query"

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 new object from query"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language