mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-07 00:58:24 +08:00
fixed: 修复 createIdKeyGenerator 提示错误的问题
This commit is contained in:
parent
73bc5e0ec5
commit
7f19e4c6bb
@ -57,7 +57,7 @@ public class MybatisKeyGeneratorUtil {
|
||||
FlexGlobalConfig.KeyConfig globalKeyConfig = FlexGlobalConfig.getConfig(ms.getConfiguration()).getKeyConfig();
|
||||
KeyType keyType = getKeyType(idInfo, globalKeyConfig);
|
||||
|
||||
if (keyType == KeyType.None) {
|
||||
if (keyType == null || keyType == KeyType.None) {
|
||||
return NoKeyGenerator.INSTANCE;
|
||||
}
|
||||
|
||||
@ -74,7 +74,7 @@ public class MybatisKeyGeneratorUtil {
|
||||
//通过序列生成的注解
|
||||
String sequence = getKeyValue(idInfo, globalKeyConfig);
|
||||
if (StringUtil.isBlank(sequence)) {
|
||||
throw FlexExceptions.wrap("please config @Id(value=\"...\") for field: %s in class: %s"
|
||||
throw FlexExceptions.wrap("Please config sequence by @Id(value=\"...\") for field: %s in class: %s"
|
||||
, idInfo.getProperty()
|
||||
, tableInfo.getEntityClass().getName());
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user