Skip to content

Commit 1a6ba6e

Browse files
committed
README.md: introduce sub sections for "Dart integration"
1 parent f0cf3e1 commit 1a6ba6e

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,16 @@ To try out the demo code in this repository, do the following:
2121
In general, Dart class annotations are used in order to design ObjectBox entities in the most intuitive way possible.
2222
Note that right now, only a limited set of types is supported; this will be expanded upon in the near future.
2323
Entity IDs and UIDs defined in their respective annotations need to be unique across all entities, while property IDs only need to be unique in their respective entity; property UIDs also need to be globally unique.
24-
Additionally, each entity needs its own _Id_ property of type _Long_; its value always needs to be >= 1. If, when given to `Box.put`, the _Id_ property of an entity instance is `0` or `null`, it will be automatically filled with a new ID automatically assigned by ObjectBox.
24+
2525
All non-annotated class instance variables are ignored by ObjectBox.
2626

27+
### Object IDs
28+
Each entity is required to have an _Id_ property of type _Long_.
29+
Already persisted entities have an ID greater or equal to 1.
30+
New (not yet persisted) objects typically have _Id_ value of `0` or `null`: calling `Box.put` automatically assigns a new ID to the object.
31+
32+
### Example
33+
2734
```dart
2835
import "../lib/objectbox.dart";
2936

0 commit comments

Comments
 (0)