首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

在hibernate 中透过写一个sql 语句封装一个字段

2012-06-28 
在hibernate 中通过写一个sql 语句封装一个字段property nameyellowday typejava.lang.Integer for

在hibernate 中通过写一个sql 语句封装一个字段

<property name="yellowday" type="java.lang.Integer" formula="(select datediff(day,t.filldate,
???(select top? 1 (t.year+'-'+t.month+'-'+t.day) from t_sys_holiday t
???where t.year+'-'+t.month+'-'+t.day>=
???(select? dateadd(day,(select t.yellowday? from t_pz_db t? where t.rendertype='S' and t.headtype='1'),r.enddate)
???from t_zn_task_reduce r where r.id=id)
???and t.holiday='0')) from t_zn_task_schedule t? where t.momentid=id)">??????
??????? </property>?????
????????????
??<property name="redday" type="java.lang.Integer" formula="(select datediff(day,t.filldate,
???(select top? 1 (t.year+'-'+t.month+'-'+t.day) from t_sys_holiday t
???where t.year+'-'+t.month+'-'+t.day>=
???(select? dateadd(day,(select t.redday from t_pz_db t? where t.rendertype='S' and t.headtype='1'),r.enddate)
???from t_zn_task_reduce r where r.id=id)
???and t.holiday='0')) from t_zn_task_schedule t? where t.momentid=id)">????????????
???</property>???????????
???????

热点排行