delete<TModel extends CModel> method
bool
delete<TModel extends CModel>(
- TModel instance, {
- Query? query,
- ModelRepository<
CModel> ? repository,
Remove a model instance
Implementation
@override
bool delete<TModel extends CModel>(instance, {query, repository}) {
if (!manages(TModel)) return false;
logger.finest('#delete: $TModel, $instance, $query');
managedObjects[TModel] ??= {};
managedObjects[TModel]!.remove(instance.primaryKey);
return true;
}