feat[orm]: id filed can use other name with @BsonId or @Id annotation

This commit is contained in:
sando committed 2024-07-30 12:15:13 +08:00
1 parent 50fb45dd66
commit b2a45c703b
6 files changed
+102 -15

No files matched your search

+1 -1
View File
@@ -26,7 +26,7 @@ var collection = OrmContext.getOrmManager().getCollection(UserEntity.class)
#### 2. Indirect use (middle level API) to access data through the collection's simple wrapper IAccessor and IQuery interfaces
- IAccessor is a data access interface
- Inserting data into the database uses the return value of the object's id() method as the primary key
- Inserting data into the database uses the field value of the object's field which marked `@Id` as the primary key
```
OrmContext.getAccessor().insert(obj)
```