表映射没问题, 放入数据库中查询编译报错,报错:
Caused by: com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-206, SQLSTATE=42703, SQLERRMC=CONTRACT0_.CONTRACTID, DRIVER=3.63.123
错误:CONTRACT0_.CONTRACTID 未找到,在数据库中查需要加上双引号查询才行,
像这样:
select CONTRACT0_.“CONTRACTID” from PLATFORM.contract
/////////////分割/////////////////////////
Hibernate: /* FROM Contract */ select contract0_.Contractid as Contractid309_, contract0_.ContractName as Contract2_309_, contract0_.Dept as Dept309_, contract0_.ContractUserid as Contract4_309_, contract0_.ContractUnit as Contract5_309_, contract0_.BigDate as BigDate309_, contract0_.EndDate as EndDate309_, contract0_.Phone as Phone309_, contract0_.toMONEY as toMONEY309_, contract0_.Tons as Tons309_, contract0_.Remark as Remark309_, contract0_.htTYPY as htTYPY309_, contract0_.identifier as identifier309_ from PLATFORM.contract contract0_