File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
nitrite/src/docs/asciidoc/collections/crud-operations Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,23 @@ NitriteId for every document and saves the value of the NitriteId into the '_id'
1111Each object in an ObjectRepository can be uniquely identified by a field marked with `@Id` annotation. Nitrite
1212maintains an unique index on that field to identify the objects.
1313
14- NOTE: Id field of an object does not have any relation with the `_id` field of the underlying Document.
14+ [NOTE]
15+ ====
16+ Id field of an object does not have any direct relation with the `_id` field of the underlying Document.
17+
18+ But one can retrieve the corresponding NitriteId for an object like this
19+
20+ [source,java]
21+ --
22+ public class MyType {
23+
24+ @Id
25+ private NitriteId idField;
26+ private String name;
27+ }
28+ --
29+
30+ ====
1531
1632.Create operations for NitriteCollection
1733[source,java]
You can’t perform that action at this time.
0 commit comments