isar / isar/hive

when save object A,B,C B/C extend A

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

Description

**Steps to Reproduce**
example :
when save object class A,B,C B/C extend A 。
if register typeadapter with sort: A-adapter,B-adapter,C-adapter

when save B, will use A-adapter,it will lose properties of B。

reason: match adapter use value is T,
class ResolvedAdapter {
final TypeAdapter adapter;
final int typeId;

ResolvedAdapter(this.adapter, this.typeId);

bool matches(dynamic value) => value is T; //here value is T, B and C alse subclass of A,so return true
}

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.