Hey folks, I'm trying to specify columns from rela...
# prisma-client
r
Hey folks, I'm trying to specify columns from related tables to be shown, rather than every column I've got this working but its showing everything from all the tables mentioned
Copy code
const shelfContents = await prisma.libraryShelves.findUnique({
    where: {
        shelfId: id
    },
    include: {
        shelfRelease: {
            include: {
                releaseArtists: true,
                releaseRecordLabel: true,
                releaseFormats: true,
                releaseStyle: true,
                releaseGenres: true,
                releaseCurrentLocation: true,
                }
            },
        },
});
every time I add a
select: {}
statement to any of the included tables, or even to
libraryShelves
under the
where@{}
the whole statement falls apart and just returns the clientversion information can anyone please advise?
👀 1
a
Hey Rich, I would try replacing the
include
’s with
select
’s.
v
👋 Hello @Rich Starkie, did you have a chance to see Austin's suggestion? Let us know if you still need help!