更新时间:2023-11-15 18:36:46
id被注入对象:
int num_of_record_inserted = fileAttachmentMapper.insertSelective(fileAttachment);
int id = fileAttachment.getId();
selectKey
做的是设置id在你要插入的对象中,在这种情况下在 fileAttachment
中的属性 id
并插入AFTER记录。
What selectKey
does is to set the id in the object you are inserting, in this case in fileAttachment
in its property id
and AFTER record is inserted.