Closed
Description
Basic info (please complete the following information):
- ObjectBox version: 1.4.1
- Flutter/Dart SDK: 2.10.3
- Null-safety enabled: yes
- Reproducibility: yes, sample available here
- OS: Android, iOS, macOS
- Device/Emulator: n/a
Steps to reproduce
Example available here
- Add several attachments to the first note by clicking on the attachment icon, don't add them to other notes
- Update query for a Note entity that has ToMany relation using
..linkMany(Entitiy_.relation)
ObjectBox._create(this.store) {
noteBox = Box<Note>(store);
final qBuilder = noteBox.query()
..order(Note_.date, flags: Order.descending)
// Comment to see it working
..linkMany(Note_.attachment);
queryStream = qBuilder.watch(triggerImmediately: true);
// Add some demo data if the box is empty.
if (noteBox.isEmpty()) {
_putDemoData();
}
}
- Hot restart the app
- Observe that it doesn't emit values which have no entities in the above relation
- Comment out line 23 in
objectbox.dart
file, hot restart the app, and observe this entity to be shown again
Expected behavior
Query using .linkMany
should emit values also when there are no entities in the ToMany relation
Code
Sample available here https://github.com/objectbox/objectbox-dart/pull/402/files