Skip to content

Commit 629c330

Browse files
committed
Fix README.md example
1 parent 44721d9 commit 629c330

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,9 @@ ob = objectbox.Builder().model(model).directory("db").build()
7979
# Open the box of "Person" entity. This can be called many times but you can also pass the variable around
8080
box = objectbox.Box(ob, Person)
8181

82-
id = box.put(Person(name="Joe Green")) # Create
82+
person = Person()
83+
person.name = "Joe Green"
84+
id = box.put(person) # Create
8385
person = box.get(id) # Read
8486
person.name = "Joe Black"
8587
box.put(person) # Update

0 commit comments

Comments
 (0)