prisma: Getting error on deeper includes
I am getting this error on Preview 23 that worked on Preview 21 Error:
Expected at most 1 item for 'timetable', got 2
Query:
const data = await prisma.passenger.findMany({
include: {
booking: {
include: {
timetable: true
}
}
}
});
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 5
- Comments: 22 (9 by maintainers)
+1
I am also seeing themissing FROM-clause
error when trying to include a field that is part of a M-N relation. It was working fine in preview022Ah, Should have checked that. I just installed @latest. Anyways, installed the alpha and ran a couple queries that I knew would break and they now work! Nice work!!
@tomitrescak There is no good workaround other than making multiple queries or using raw method.