Skip to content

Allow eager-loading of deleted models

Compare
Choose a tag to compare
@VaporBot VaporBot released this 23 Mar 11:31
· 36 commits to main since this release
21d99b0
This patch was authored by @tarag and released by @gwynne.

Allows eager-loading of soft-deleted models. For maximum flexibility, choosing whether to load soft-deleted models or not is performed for each relation at each query call.

Usage is as follows: let galaxies = try Galaxy.query(on: self.database).with(\.$stars, withDeleted: true)

Use of default argument value of false requires no change to existing code to keep existing behaviour.

Fixes #375.