fromMap method
Convert DB map into a model instance
Implementation
T fromMap(Map<dynamic, dynamic> map) {
final model = _factory();
map.forEach((key, value) {
final attributeKey = key.toString();
model.setAttribute(
attributeKey,
_hydrateRelationValue(attributeKey, value),
);
});
return model;
}