MyBatis-Spring-Boot icon indicating copy to clipboard operation
MyBatis-Spring-Boot copied to clipboard

【强制】POJO 类的布尔属性不能加 is,而数据库字段必须加 is_,要求在 resultMap 中进行字段与属性之间的映射

Open helloworldtang opened this issue 8 years ago • 3 comments

对阿里的这条规约, 怎么看

autogenerator

helloworldtang avatar Jun 29 '17 02:06 helloworldtang

在用Boolean类型的情况下,即使是isXX,getter方法也是getIsXX,不是isXX

boolean的情况下,会出现isIsXX

这个规范挺好。

abel533 avatar Jun 29 '17 03:06 abel533

但是自动生成PO的工具,不是按这个走的。这样改动的成本有些大:生成后,还要手动改一版,小组不易达成一致

helloworldtang avatar Jul 13 '17 06:07 helloworldtang

改自动生成PO的工具。

abel533 avatar Jul 13 '17 13:07 abel533