delete<TModel extends CModel> method

  1. @override
bool delete<TModel extends CModel>(
  1. TModel instance, {
  2. Query? query,
  3. 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;
}