-
Notifications
You must be signed in to change notification settings - Fork 400
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
逻辑删除标识符的理解 #11
Labels
Comments
logicalDeleteValue/logicalUnDeleteValue 分别对应 DEL_FLAG_OFF/DEL_FLAG_ON,这个是之前一些遗留项目作怪定下来的。按当时他们说法DEL_FLAG做开关,ON就是没删除OFF就是删除~~~~~,所以在写这个插件时为了兼顾这些所以就延续了这种说法,也是一时没想到更好的命名。 |
谢谢解答。我个人认为这个变量名有点反直觉,希望以后可以有一个更合适的命名~ |
一般的规范此列名为is_deleted,建议取名为 IS_DELETED/NOT_DELETED |
已修正,同时增加相应配置选项方便自定义V1.0.17。 |
关于唯一索引,有时候会把isdeleted字段设置加进唯一索引组合里面,所以删除字段我会改成 is_delete+1,但是在生成实体类的时候会报错,有点不方便,希望作者可以改进一下 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
不知道logicalDeleteValue/logicalUnDeleteValue和生成的常量DEL_FLAG_ON/OFF是一个怎样的对应关系呢?按照我的理解DEL_FLAG_ON是说明删除标识符被置为true,DEL_FLAG_OFF说明删除标识符被置为false,但是实际上生成的与我理解的正好相反,您是怎样理解这个删除常量的呢?
配置:
实际生成:
The text was updated successfully, but these errors were encountered: