const result = await db.query.series.findMany({
with: {
genres: {
with: {
genre: true,
},
},
studios: {
with: {
studio: true,
},
where: (studios, { eq }) => eq(studios.isMain, true),
limit: 1,
},
},
});
const result = await db.query.series.findMany({
with: {
genres: {
with: {
genre: true,
},
},
studios: {
with: {
studio: true,
},
where: (studios, { eq }) => eq(studios.isMain, true),
limit: 1,
},
},
});