<insert id="saveCustomer" parameterType="com.xiaonatech.dsx.entity.CustomerEntity" useGeneratedKeys="true" keyProperty="policyID">
???dao ???
public int saveCustomer(CustomerEntity cs);
? ???? ?? 1? ?????. object.id? ?? ?? ?? ????. ??????? mysql???.
CustomerEntity applyRecord = new CustomerEntity();
歡迎選擇我的課程,讓我們一起見證您的進步~~
? ???? ???? ?? ??? ??? ?? ??? ????.
??? ??? ID? ??? ? ?? ??? ? ????.
useGeneratedKeys="true" keyProperty="id" xml ???? keyProperty? ?? ?? ??? ??? id? ???? ?? ??? ???? ?????? ?????. ???? ?? ? ?? ??? ???? ?? ?? ?????
<insert id="save" ????Type="atyy.model.ArticleCategoryPO" useGeneratedKeys="true">
</insert>
??? ????? ?? ??? useGeneratedKeys="true"
1. ?????? ID? auto_increment?? ???.
2. useGeneratedKeys="true" ? keyProoerty? ?????.
3. ?? ????? ???? ???? ?? ?, ? ??? ?? ??? ?? 1???. ?? ID? ???? ???? ?? getter ???? ?????