Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

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);
Comment

PREVIOUS NEXT
Code Example
Java ::  
:: java ee service formparam optional 
::  
::  
::  
:: dialog box in java swing 
::  
Java ::  
:: java initialize map with values in one line 
::  
::  
Java ::  
Java :: linear layout background color 
::  
::  
::  
::  
::  
::  
Java :: add value with n variable with Arraylist in java 
::  
Java ::  
::  
:: how to iterate hashset in java 8 
Java ::  
::  
::  
::  
::  
Java ::  
ADD CONTENT
Topic
Content
Source link
Name
3+7 =