Is it possible to seed nested referenced entities?

If I have three tables with a one to many relations: Agency -> Project -> Domain I see in the docs that with refine you can create references from one table to another:
await seed(db, schema).refine(f => ({
agency: {
count: 3,
with: {
project: 4
}
}
}))
await seed(db, schema).refine(f => ({
agency: {
count: 3,
with: {
project: 4
}
}
}))
But I would also like to create references to domains, however I cannot keep nesting after project. How to create relationships between project and domain, so the project refers to an agency?
1 Reply
ciscoheat
ciscoheatOP4w ago
I see that all tables are automatically seeded and references, even those not mentioned in the refine callback.

Did you find this page helpful?