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

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -