insert into HA_PhysicalExaminationRecord(examinationDate, jcpj_isException) values(#{examinationDate}, 0) select @@identity

This error message indicates that the Java class doesn't have a setter method corresponding to the 'ID' key property. The issue stems from using 'ID' as the keyProperty while the actual property name within your Java class is likely 'examID'. To rectify this, modify the 'keyProperty' attribute in your statement to 'examID' as shown in the corrected code above. This alignment between the keyProperty and the Java class property ensures a successful mapping of the generated key.

MyBatis Insert Statement Error: No Setter Found for 'ID' in java.util.Date

原文地址: https://www.cveoy.top/t/topic/qjIb 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录