Query fields on an object
Given my prisma schema:
I am looking to make a query on the zip code, quite simple requirement.
However, Prisma isn't allowing this to happen:
let dominantZipAddresses = await database.feature.findMany({where:{
properties:{postcode: dominantZip}
}});
This fails because it expects id, unit, etc. to also be included with the postcode. But for a query that makes no sense. Without defaulting to raw queries, how can I accomplish this?
0 Replies