java - Retrieving values of a specific field in Hibernate -


consider class:

class employee{  integer empid,   //many other fields } 

i need dao method shown below

 list<integer> getallemployeeids(){  //??  } dont want list<employee> ,  (new edit) set<intger> 

how can in hibernate?am using hbm files mapping

like this. also, recommend use querydsl make type-safe.

list<integer> getallemployeeids(){     return (list<integer>)createquery("select e.empid employee e").list(); } 

Comments

Popular posts from this blog

javascript - Iterate over array and calculate average values of array-parts -

iphone - Using nested NSDictionary with Picker -

objective c - Newbie question -multiple parameters -