Thomas Georgiadis
03/17/2021, 10:56 PMconst update = await prisma.user.update({
where: {
id: 6,
},
data: {
posts: {
update: [
{
where: {
id: 9,
},
data: {
title: 'Posts 9 title',
},
},
{
where: {
id: 10,
},
data: {
title: 'Post 10 title is different',
},
},
]
},
},
})
Sergio Bilello
03/18/2021, 3:50 AMKha
03/18/2021, 7:00 AMpropagandalf
03/18/2021, 7:34 AMPost
and User
models."Justin
03/18/2021, 7:50 AMmxstbr
03/18/2021, 9:41 AMJulien Goux
03/19/2021, 10:11 AMJulien Goux
03/19/2021, 10:11 AMNicolas Toulemont
03/19/2021, 10:13 AMJulien Goux
03/19/2021, 10:13 AMJulien Goux
03/19/2021, 10:14 AMJulien Goux
03/19/2021, 10:16 AMNicolas Toulemont
03/19/2021, 10:16 AM{
"en": {
"title": "Content"
},
"fr": {
"title": "Contenu"
}
}
Julien Goux
03/19/2021, 10:16 AMNicolas Toulemont
03/19/2021, 10:18 AMobject[i18n].title
Ryan Bethel
03/19/2021, 5:44 PMEric Hosick
03/19/2021, 7:12 PMLars Ivar Igesund
03/20/2021, 11:14 AMDevThoughts
03/21/2021, 12:34 PMJoey
03/21/2021, 1:30 PMJoey
03/21/2021, 1:31 PMimport { PrismaClient } from "@prisma/client";
^^^^^^^^^^^^
SyntaxError: Named export 'PrismaClient' not found. The requested module '@prisma/client' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:
import pkg from '@prisma/client';
const { PrismaClient } = pkg;
Joey
03/21/2021, 1:32 PMnode
application using type: "module"
in package.json
chrisdhanaraj
03/21/2021, 10:56 PMnpx prisma db seed --preview-feature
flags a "No seed file found."
This has worked in the past though - I have a prisma/seed.sh
file and I'm not quite sure what it's doing. Any tips on trying to debug this?Robin
03/22/2021, 7:51 AMnpm instal
will also run the generate, wont it?Robin
03/22/2021, 7:51 AMhuv1k
03/22/2021, 7:51 AMgroupBy
queries grouped by FK 🤔 Example
await prisma.post.groupBy({
by: ['userId'],
sum: {
likes: true,
},
})
So we can get/select user
in this query instead of running another query for users 🤔Harsh Makwana
03/22/2021, 9:15 AMcreatedAt
with exact given date. but when I’m passing full date with ISO format it’s not returning any records from the table.stephan levi
03/22/2021, 11:24 AMSascha
03/22/2021, 1:57 PMadashi
03/22/2021, 3:47 PMnpm i
on a prisma project.
I’m upgrading from 2.10.0
to 2.19.0
. Tried to clear the node_modules folder before, but got the same result.
API/node_modules/prisma/node_modules/@prisma/engines/download/index.js:43
`,CHAR_NO_BREAK_SPACE:" ",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:""}});var Im=m((w2,Om)=>{"use strict";const sR=Bs(),{MAX_LENGTH:km,CHAR_BACKSLASH:La,CHAR_BACKTICK:iR,CHAR_COMMA:oR,CHAR_DOT:aR,CHAR_LEFT_PARENTHESES:cR,CHAR_RIGHT_PARENTHESES:lR,CHAR_LEFT_CURLY_BRACE:uR,CHAR_RIGHT_CURLY_BRACE:hR,CHAR_LEFT_SQUARE_BRACKET:Pm,CHAR_RIGHT_SQUARE_BRACKET:Cm,CHAR_DOUBLE_QUOTE:fR,CHAR_SINGLE_QUOTE:pR,CHAR_NO_BREAK_SPACE:dR,CHAR_ZERO_WIDTH_NOBREAK_SPACE:mR}=Am(),gR=(e,t={})=>{if(typeof e!="string")throw new TypeError("Expected a string");let r=t||{},n=typeof r.maxLength=="number"?Math.min(km,r.maxLength):km;if(e.length>n)throw new SyntaxError(`Input length
ReferenceError: globalThis is not defined
at m (/home/api/API/node_modules/prisma/node_modules/@prisma/engines/download/index.js:43:34150)
at /home/api/API/node_modules/prisma/node_modules/@prisma/engines/download/index.js:1:164
at m (/home/api/API/node_modules/prisma/node_modules/@prisma/engines/download/index.js:43:34284)
at /home/api/API/node_modules/prisma/node_modules/@prisma/engines/download/index.js:1:164
at Ot (/home/api/API/node_modules/prisma/node_modules/@prisma/engines/download/index.js:43:35834)
at /home/api/API/node_modules/prisma/node_modules/@prisma/engines/download/index.js:1:164
at Ct (/home/api/API/node_modules/prisma/node_modules/@prisma/engines/download/index.js:43:39183)
at /home/api/API/node_modules/prisma/node_modules/@prisma/engines/download/index.js:1:164
at cc (/home/api/API/node_modules/prisma/node_modules/@prisma/engines/download/index.js:43:42525)
at /home/api/API/node_modules/prisma/node_modules/@prisma/engines/download/index.js:1:164