IDはオブジェクトに挿入されます:
int num_of_record_inserted = fileAttachmentMapper.insertSelective(fileAttachment);
int id = fileAttachment.getId();
selectKeyとは 挿入するオブジェクト、この場合はfileAttachmentにIDを設定します。 そのプロパティのid とAFTERレコードが挿入されます。
IDはオブジェクトに挿入されます:
int num_of_record_inserted = fileAttachmentMapper.insertSelective(fileAttachment);
int id = fileAttachment.getId();
selectKeyとは 挿入するオブジェクト、この場合はfileAttachmentにIDを設定します。 そのプロパティのid とAFTERレコードが挿入されます。