Skip to content

Commit d2b65f2

Browse files
committed
fix #102
1 parent 7612af4 commit d2b65f2

File tree

1 file changed

+17
-1
lines changed
  • nitrite/src/docs/asciidoc/collections/crud-operations

1 file changed

+17
-1
lines changed

nitrite/src/docs/asciidoc/collections/crud-operations/insert.adoc

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,23 @@ NitriteId for every document and saves the value of the NitriteId into the '_id'
1111
Each object in an ObjectRepository can be uniquely identified by a field marked with `@Id` annotation. Nitrite
1212
maintains 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]

0 commit comments

Comments
 (0)