The following two mappings are made to the KPI ID in the database in Hibenrnate
<property name= "kpiid" type= "Java.lang.Integer" insert= "false" update= "false";
<column name= "kpi_id";
<comment>kpi Id</comment>
</column>
</property>
<many-to-one name= "KPI" class= " Com.ibm.appMonitor.pojo.TKpi "lazy=" false " ;
<column name= "kpi_id";
<comment>kpi_id</comment>
</column>
</many-to-one>
where "Kpiid" indicates insert = ' false ' update = ' false '
So be careful when saving and updating KPIs instead of KPIID
Important: If you are using SQL queries instead of HQL queries, be aware of the first new KPI object when encapsulating objects
Then assign a value to the query object. Otherwise, when you save the update to the database, you will find that kpi_id becomes a null value.
Hibernate has both object properties and character attributes configured for the same field in the database