Jamie Higgins
09/15/2022, 2:34 PMasync function getLatestBuildByTagAndVersion(tag: string, appVersionId: number) {
const result = prisma.build.findFirst({
where: {
component_version: {
app_version_id: appVersionId,
git_tag: tag,
git_sha: "want this from the build.git_sha",
},
},
orderBy: {
build_number: "desc",
}
});
Essentially I want git_sha to be:
build.git_sha = component_version.git_sha
nikolasburk
fieldReference
feature that we have just released in Preview in the last release. Here are the docs for it: https://www.prisma.io/docs/reference/api-reference/prisma-client-reference#compare-columns-in-the-same-table
(Also, feel free to share the relevant parts of your Prisma schema, that way it’s easier for everyone to reproduce the problem and help you out 🙂 )Vladi Stevanovic
Vladi Stevanovic