Michael
06/14/2021, 9:15 PMpnpm
, but I'm wondering how best to configure node_module dependencies for Prisma in projects that have multiple subprojects - where more than 1 subproject would use Prisma.
For example - in my current project I hoist
everything by default so when I run npx prisma generate
it generates @prisma/client
based on my DB/Prisma modules in the root project folder. But I wonder I had another project that used Prisma if this would compete and overwrite the common @prisma/client
package in root. Sorry if this is confusing (again new to pnpm
) but is this a problem I am making up (ie would pnpm
handle this appropriately by default)? And if not, how best to configure subprojects like this for Prisma with pnpm
?Scratchyone Scratchyone
06/15/2021, 2:03 AMPhilippe
06/15/2021, 7:16 AMGuillaume Le Nistour
06/15/2021, 7:18 AMstephan levi
06/15/2021, 7:30 AMDavedavedave
06/15/2021, 8:27 AMuser
06/15/2021, 8:31 AMDavedavedave
06/15/2021, 9:33 AMDavedavedave
06/15/2021, 10:19 AM.update({
data: {
...updateData,
origin: {
connect: {
city: origin
},
},
},
where: {id},
}
Manish
06/15/2021, 1:11 PMmodel Post {
id Int @id @default(autoincrement())
categories Category[]
}
model Category {
id Int @id @default(autoincrement())
name String
posts Post[]
}
If I have a list of categories, like:
[{ id: 3, name: 'books'},{ id: 5, name: 'movies' }]
How can I find all posts that have atleast one of these categories?Gian Franco Fioriello
06/15/2021, 3:24 PMSubash Ganesh
06/15/2021, 4:14 PMEdward Baer
06/15/2021, 4:35 PMSamuel Corsi-House
06/15/2021, 4:45 PM❯ npm install -D prisma@2.25.0
npm ERR! Cannot read property 'matches' of null
How can I install it properly? Note I would like to use pnpm
but prisma always seems to try to install with npm
Jonathan Blair
06/15/2021, 6:37 PMJonathan Blair
06/15/2021, 6:37 PMMykyta Machekhin
06/15/2021, 8:53 PMupsert
is non-transactional. After completing many upsert
asynchronously, one of the call fell with a uniqueness error. That is, as I understand it, the prisma first run a select, and there is no record. Then value from other call writing down in a DB, after that the prisma tried to write down value, believing that it is not present in a DB that ended with an error
Is this expected behavior? If so, can this point be recorded in the documentation? And the main question - how can we simulate an upsert
transactionally?Dário Nascimento
06/15/2021, 11:13 PMGeorge
06/16/2021, 7:07 AMmatthew
06/16/2021, 8:26 AMDBCLUSTER_SECRET="{\"password\":\"pass\",\"dbname\":\"dbname\",\"engine\":\"mysql\",\"port\":3306,\"host\":\"localhost\",\"username\":\"user\"}"
Prisma wants a DB URL within the schema file. Is is possible to parse the JS string within the Prisma schema?
Or any idea if its possible to have each value as a key value pair, from AWS rather than on JSON string?
DB_PASSWORD=pass
Benjamin Kroeger
06/16/2021, 10:22 AMisGenerated
and dbNames
properties of DMMF.Field
? Any hint is welcome!Halvor
06/16/2021, 11:01 AMHalvor
06/16/2021, 11:01 AMBård
06/16/2021, 12:55 PMTharshan
06/16/2021, 1:44 PMYilmaz Ugurlu
06/16/2021, 1:59 PMQuery engine binary for current platform "darwin" could not be found.
This probably happens, because you built Prisma Client on a different platform.
(Prisma Client looked in "/query-engine-darwin")
Searched Locations:
/.prisma/client
/Users/metoikos/xxx/project/node_modules/lib/node_modules/@prisma/client
/
/
/
/tmp/prisma-engines
/
The engine at the project/node_modules/.prisma/client/query-engine-darwin
and /Users/metoikos/xxx/project/node_modules/lib/node_modules/.prisma/client
path I can see it but somehow Prisma cannot found. Is there a way that I can point client to the right location to find the engine.Jack Tan
06/16/2021, 2:07 PMHalvor
06/16/2021, 3:42 PMHalvor
06/16/2021, 3:43 PMHalvor
06/16/2021, 3:48 PM