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
Post a Comment