BaseModelFieldExtension extension

Adds methods to BaseModel to help with performing operations on the fields

on

Methods

copy<T extends BaseModel>(T model, {bool allowDifferentTypes = false, bool copyId = true, Iterable<String>? onlyFields, Iterable<String>? exceptFields}) → void
Copies values from the given model into this model.
fieldsToEvaluate<T extends BaseModel>(Iterable<String>? onlyFields, Iterable<String>? exceptFields) Iterable<String>
Returns the fields that exist in this model.
hasSameFields<T extends BaseModel>({required T model, Iterable<String>? onlyFields, Iterable<String>? exceptFields}) bool
Returns whether the given model has the same given fields as this model.