Skip to content

Instance Property

pivots

Allows eager loading of pivot objects through the sibling relation. Example:
@ChildrenProperty<From, Through> var pivots: [Through] { get set }

Discussion

Planet.query(on: db)
    .with(\.$tags).with(\.$tags.$pivots).first() { planet in
        // you can now access the loaded pivots using:
        let pivots = planet.$tags.pivots
    }