Support Deleting Many Relationships
GregBrimble opened this issue · 2 comments
GregBrimble commented
Right now:
instance.relations = [instance, otherInstance]
await instanceRepo.save(instance)
instance.relations = [instance]
await instanceRepo.save(instance)
await instance.relations // [instance, otherInstance]
GregBrimble commented
Some sort of array-like interface?
type oneToManyType<T> =
| T[]
| {
push(value: T): void
pop(): T
clear(): void
}
| AsyncGenerator<T>
GregBrimble commented
Add instanceRepo.delete(instance)
method, and use that for some funky deletion stuff for these many relationship values.