Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] QueryHints-ResultType-Map

 
 
Hi
 
I am using the QueryHint  as follows...
 
String strQuery="Select c.name,d.name from User c , Office d where c.id=d.id";

Query query = em.createQuery(strQuery);

query.setHint(QueryHints.RESULT_TYPE, ResultType.Map);

List<ReportQueryResult> resultList=query.getResultList();

and the ReportQueryResult contains two values with same key 'name'.
By knowing the index we can identify the two values.. But in my scenario i cant get the values by its index...
 
Is it possible to add the alias' (c/d) with the key of the returning map so that i can get the value with key c.name or d.name ???
 
Please help me..
 
 
 

Thanks & Regards,
Saritha V S             
 

Back to the top