Skip to content

Commit

Permalink
Fix README.md example
Browse files Browse the repository at this point in the history
  • Loading branch information
loryruta committed Aug 29, 2023
1 parent 44721d9 commit 629c330
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ ob = objectbox.Builder().model(model).directory("db").build()
# Open the box of "Person" entity. This can be called many times but you can also pass the variable around
box = objectbox.Box(ob, Person)

id = box.put(Person(name="Joe Green")) # Create
person = Person()
person.name = "Joe Green"
id = box.put(person) # Create
person = box.get(id) # Read
person.name = "Joe Black"
box.put(person) # Update
Expand Down

0 comments on commit 629c330

Please sign in to comment.