Hive returns edited object instead of the original one
- Dominant language
- Dart
- Stars
- 4.4k
- Forks
- 449
- PR merge metrics
- No merged PRs in 30d
Description
**Steps to Reproduce**
I open the box and search for all the objects.
I choose an object and edit a field, but I don't record it in the box.
I search again for the same object in the box using the ID.
The box returns the edited object, not the original.
[Github demo](https://github.com/daybson/notworking.git)
**Code sample**
```
_box = await Hive.openBox('Foo');
var all = _box!.values;
var someObj = all[x]; // someObj.Id is 2 and someObj.Name is 'Luiz', for example
someObj.name = 'Dave'; //change to Dave, but don't update the box
var anotherObj = _box!.get(2); //search the original object
print(anotherObj.name); //prints the 'Dave' instead 'Luiz'
```
**Version**
- Platform: Android
- Flutter version: 2.2
- hive: ^2.0.4
- hive_flutter: ^1.0.0
- hive_generator: ^1.1.0
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.