Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Ellioben opened this issue Feb 10, 2023 · 0 comments
Open

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

Ellioben opened this issue Feb 10, 2023 · 0 comments

Comments

@Ellioben
Copy link

Ellioben commented Feb 10, 2023

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为空,则是不加条件的全表删除 😰

@Ellioben Ellioben changed the title 提一个bug,关于自动生成delete 提一个bug,关于自动生成delete语句 Feb 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant