doc[orm]: readme

This commit is contained in:
godotg
2024-06-17 17:18:22 +08:00
parent 0d2ff37e56
commit a8768f1920
3 changed files with 0 additions and 3 deletions
-1
View File
@@ -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
-1
View File
@@ -113,7 +113,6 @@ userEntityCaches.update(entity);
- 如果不想映射某属性,直接加上transient关键字
- 支持基本数据属性(byteshortintlongfloatdoubleboolean),字符串String,自定义对象,不支持泛型
- 数组支持一维数组,集合支持List,Set
- Map类型MongoDB官方限定了key只能为String
- 数据库主键能用整数尽量用整数,因为MongoDB默认的主键是一个字符串,比较占空间
- 数据库使用自研的orm框架,比如一个实体类UserEntity,映射到数据库中的集合为user,首字母小写,去掉Entity
- 智能语法分析,不支持泛型和循环引用的对象,错误的entity对象定义将无法启动程序并给出错误警告
@@ -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);