SSH项目中 hibernate查询问题

来源:百度知道 编辑:UC知道 时间:2024/06/28 06:13:42
Hibernate: select temppost.enterprise_id, temppost.post_id,temppost.post_name,temppost.enterprise_name, temppost.deliver_num,temppost.publish_time,temppost.workplace1_id,temppost.workplace2_id, temppost.workplace3_id,temppost.workplace4_id , temppost.language_req , temppost.lastpublish_time from ( select t2.deliver_num, t2.enterprise_id,t2.post_id, t1.industry_id, t2.publish_time, t2.work_experience_req, t2.monthsalary_id, t1.enterprise_prop, t2.edu_background_req, t2.post_property, t1.enterprise_name, t2.post_name, t2.post_desc, t2.workplace1_id , t2.workplace2_id, t2.workplace3_id,t2.workplace4_id, t2.workplace5_id, t2.post_function1_id, t2.post_function2_id, t2.post_function3_id, t2.post_function4_id, t2.post_function5_id, t1.enable_status enable_status1, t2.post_state,t2.enable_status enable_status2, t2.validity_period, t2.lastpublish_time, t2.language_req from EnterpriseInfo t1 inner join EnterprisePost t2 on t2.enterprise_id = t1.enterprise_id ) temppost WHERE temppost.post_st

temppost.enterprise_id 看看是 不是 和 Temppost.hbm.xml 中的一样

<property name="enterpriseName" type="java.lang.String">
<column name="enterprise_name" length="20" />
</property>

name 是对应实体类的名子
column 是数据库的名字