toActiveDataclass method
This function is used to ensure that the correct dataclass type is returned by the manager.
Depending on if withReferences
was called, we will either return a list of $Dataclass
or $DataclassWithReferences
Implementation
List<$ActiveDataclass> toActiveDataclass(List<TypedResult> items) {
if ($DataclassWithReferences == $ActiveDataclass) {
return _withReferenceMapper(items) as List<$ActiveDataclass>;
} else {
return items.map((e) => e.readTable(_tableAsTableInfo)).toList()
as List<$ActiveDataclass>;
}
}