3

これは有名な例からです。

    <!-- Insert example, using the Account parameter class -->
<insert id="insertAccount" parameterType="Account">
  insert into ACCOUNT (
ACC_ID,
ACC_FIRST_NAME,
ACC_LAST_NAME,
ACC_EMAIL
)values (
    #{id}, #{firstName}, #{lastName}, #{emailAddress}

)

フィールドの 1 つに手動で null を挿入したい。

   <!-- Insert example, using the Account parameter class -->
<insert id="insertAccount" parameterType="Account">
  insert into ACCOUNT (
ACC_ID,
ACC_FIRST_NAME,
ACC_LAST_NAME,
ACC_EMAIL
)values (
    #{id}, #{firstName}, #{lastName}, #{null}

)しかし、私はこの例外を受けています

   org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'null'

誰でも助けることができます。

4

1 に答える 1