Skip to content

提一个bug,关于自动生成delete语句 #84

@Ellioben

Description

@Ellioben

Repruduce:

  1. 通过idea的database打开指定需要生成orm的表
  2. 右键选择mybatis-x generate生成mapper.xml和mapper层
  3. 在mapper层使用deleteById,自动生成mybatis的xml的模块代码

问题:

自动生成的delete语句,where id = #{id} 会被放在if(id!=null && id == "")的语句里。

如果id为空,则是不加条件的全表删除 😰

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions