detach method
Detaches ids (or all) through a BelongsToMany relation name.
Implementation
Future<int> detach(String name, [Object? ids]) {
final relation = modelDefinition.requireRelation(name);
if (relation is! BelongsToMany<Model>) {
throw StateError('Relation [$name] is not BelongsToMany.');
}
return relation.detach(this, database, ids);
}