jaguar_orm
jaguar_orm copied to clipboard
Should support inherited classes
My entities share common columns:
abstract class WithUpdate {
@Column(isNullable: true)
DateTime updatedAt;
}
When inheriting from the above class:
class SomeEntity extends WithUpdate {
@PrimaryKey()
int id;
}
code generation not generate fields from abstract class;
gen code:
abstract class _SomeEntityBean implements Bean<SomeEntity> {
final id = IntField('id');
Map<String, Field> _fields;
Map<String, Field> get fields => _fields ??= {
id.name: id,
};
SomeEntity fromMap(Map map) {
SomeEntity model = SomeEntity();
model.id = adapter.parseValue(map['id']);
return model;
}