load()

Usage

import { useRepo } from 'pinia-orm'
import User from './models/User'
const userRepo = useRepo(User)
const users = userRepo.all()
// eager load "comments" relation  for all users
userRepo.with('comments').load(users) 
// eager load "comments" relation with closure  for all users
userRepo.with('comments', (query) => {
    query.where('active', true)
}).load(users)

Typescript Declarations

function load(models: Collection<M>): void