mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-10-15 16:15:27 +00:00
feat[orm]: id filed can use other name with @BsonId or @Id annotation
This commit is contained in:
1 parent
50fb45dd66
commit
b2a45c703b
6 files changed
+102
-15
No files matched your search
+1
-1
@@ -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)
|
||||
```
|
||||
|
||||
Reference in new issue
Block a user