isar / isar/hive

Getting values first which is saved first

Open
#1,205 0 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
Dart
Stars
4.4k
Forks
449
PR merge metrics
No merged PRs in 30d

Description

**Question**
I have saved Map to Hive. like this ex: box.put(element.id, element);
element is Map. But when i get box values, it returns that elements incorrect sequence. I need to get elements, in a sequence which they were saved.

**Code sample**
```dart
//saving to hive:
await _box?.put(value.id, value);
/// getting from hive:
return (_box?.values ?? []).toList();
```

**Version**
- Platform: Mac
- Flutter version: 3.10
- Hive version: ^2.2.2

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the _box?.put and _box?.values usage shown in the issue, using the reported Hive 2.2.2 and Flutter 3.10 versions. Check the relevant Hive box-value behavior and determine whether retrieval order is guaranteed; done means providing a clear answer or documenting the expected ordering.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
database
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.