* Remove all items from the collection. Note that removing items from collection does not necessarily imply deleting the target entity, * it means we are disconnecting the relation - removing items from collection, not removing entities from database - `Collection.remove()` * is not the same a
()
| 676 | * which tells the ORM we don't want orphaned entities to exist, so we know those should be removed. |
| 677 | */ |
| 678 | removeAll(): void { |
| 679 | if (!this.#initialized) { |
| 680 | this.#initialized = true; |
| 681 | this.#snapshot = undefined; |
| 682 | } |
| 683 | |
| 684 | this.remove(this.#items); |
| 685 | this.#dirty = true; |
| 686 | } |
| 687 | |
| 688 | /** |
| 689 | * @internal |
no test coverage detected