diff --git a/orm/README.md b/orm/README.md index e717bf90..ae3fed09 100644 --- a/orm/README.md +++ b/orm/README.md @@ -119,7 +119,6 @@ userEntityCaches.update(entity); - Supports basic data properties (byte, short, int, long, float, double, boolean), string String, custom objects, does not support generics - Arrays support one-dimensional arrays, and collections support List, Set -- Map type: Mongo DB officially restricts key to String - Database primary keys can use integers as much as possible, because Mongo DB's default primary key is a string, which takes up space - The database uses a self-developed ORM framework, such as an entity class User Entity, which maps to the collection in diff --git a/orm/README_CN.md b/orm/README_CN.md index 3feea0d2..2e45dcfc 100644 --- a/orm/README_CN.md +++ b/orm/README_CN.md @@ -113,7 +113,6 @@ userEntityCaches.update(entity); - 如果不想映射某属性,直接加上transient关键字 - 支持基本数据属性(byte,short,int,long,float,double,boolean),字符串String,自定义对象,不支持泛型 - 数组支持一维数组,集合支持List,Set -- Map类型MongoDB官方限定了key只能为String - 数据库主键能用整数尽量用整数,因为MongoDB默认的主键是一个字符串,比较占空间 - 数据库使用自研的orm框架,比如一个实体类UserEntity,映射到数据库中的集合为user,首字母小写,去掉Entity - 智能语法分析,不支持泛型和循环引用的对象,错误的entity对象定义将无法启动程序并给出错误警告 diff --git a/orm/src/main/java/com/zfoo/orm/manager/OrmManager.java b/orm/src/main/java/com/zfoo/orm/manager/OrmManager.java index 82c3941d..3622b7a2 100644 --- a/orm/src/main/java/com/zfoo/orm/manager/OrmManager.java +++ b/orm/src/main/java/com/zfoo/orm/manager/OrmManager.java @@ -572,7 +572,6 @@ public class OrmManager implements IOrmManager { var keyType = types[0]; var valueType = types[1]; if (!ClassUtils.isBaseType((Class) keyType)) { - // ORM中Map的key必须是String类型 throw new RunException("The key of the map in the ORM must be of the Base type"); } checkSubEntity(currentEntityClass, valueType);