hibernat 中new对象进行查询

SELECT new cn.enn.hr.hrcontract.dao.HrContract(e.scopeName,o.name,e.id,e.lastName||e.firstName,e.mobile,e.contractDate," +       "c.contracttype,c.contractyears,c.contractdatestart,c.contractdateend,c.contractsidea,c.status) "+       "from Employee e " +       "inner join Position p with  p.employee.id = e.id  and p.active='1' and p.inCharge ='1' "

 

以上是new了个HrContract(POJO),POJO类需要有构造方法及getter &setter方法

posted @ 2012-03-14 09:05  cyjch  阅读(476)  评论(0编辑  收藏  举报