const templates = await db.query.productSetTemplates.findMany({
limit: 12,
offset: /* not important */,
orderBy: /* not important */,
where: /* not important */,
with: {
productSet: {
with: {
products: {
limit: 1
}
}
},
prototypeProductSets: {
with: {
products: {
columns: {
id: true
}
}
}
}
}
})
const templates = await db.query.productSetTemplates.findMany({
limit: 12,
offset: /* not important */,
orderBy: /* not important */,
where: /* not important */,
with: {
productSet: {
with: {
products: {
limit: 1
}
}
},
prototypeProductSets: {
with: {
products: {
columns: {
id: true
}
}
}
}
}
})