user
02/12/2022, 8:01 AMVR
02/12/2022, 12:52 PMPeter Kellner
02/12/2022, 3:33 PMconst data = await prisma.TrackSession.findMany({
where: {
Id: trackSessionIds,
},
});
Nick B
02/12/2022, 6:50 PMNick B
02/12/2022, 6:50 PMjt
02/13/2022, 7:08 AM42601
. Message: `db error: ERROR: syntax error at or near "user"`` and if I run that same query but on a different model, "budget", for example, I'm getting this error: 'relation "budget" does not exist'
. Any help would be greatly appreciated. Thanks!user
02/13/2022, 8:31 AMdhatGuy
02/13/2022, 4:18 PMorder
.prisma chobo
02/13/2022, 6:50 PMMradul Jain
02/14/2022, 11:36 AM\"\\nInvalid `prisma.configuration.upsert()` invocation:\\n\\n{\\n where: {\\n id: 1\\n },\\n update: {\\n document: {\\n baseUrl: '<http://www.kklawportal12.com|www.kklawportal12.com>'\\n ~~~~~~~\\n }\\n },\\n create: {\\n document: {\\n baseUrl: '<http://www.kklawportal12.com|www.kklawportal12.com>'\\n }\\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\n }\\n}\\n\\nUnknown arg `baseUrl` in update.document.baseUrl for type NullableStringFieldUpdateOperationsInput. Did you mean `set`? Available args:\\ntype NullableStringFieldUpdateOperationsInput {\\n set?: String | Null\\n}\\nArgument document: Got invalid value \\n{\\n baseUrl: '<http://www.kklawportal12.com|www.kklawportal12.com>'\\n}\\non prisma.upsertOneConfiguration. Provided Json, expected String or Null.\\n\\n\""
Mischa
02/14/2022, 1:01 PM{
is_panic: false,
message: 'Transaction API error: Unable to start a transaction in the given time.',
meta: { error: 'Unable to start a transaction in the given time.' },
error_code: 'P2028'
}
Tried looking it up here but P2028 is missingMichael Gardner
02/14/2022, 3:23 PMRene Nielsen
02/14/2022, 8:29 PMmodel Course {
topic Topic @relation("Topic", fields: [topicId], references: [id])
topicId String @db.ObjectId
subTopic Topic @relation("SubTopic", fields: [subTopicId], references: [id])
subTopicId String @db.ObjectId
}
model Topic {
courses. Course[] ????
}
Nick B
02/14/2022, 10:49 PMNick B
02/14/2022, 10:49 PMRamu Narasinga
02/15/2022, 6:31 AMFile | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
CardService.ts | 26.09 | 16.67 | 44.44 | 26.09 | 47-48,65-77,98-109,133-203,226-291
A code snippet of prisma
transaction I use in Cardservice
is as follows:
archiveCard(cardId: number): Promise<Card> {
return this.prisma.$transaction(async (prisma) => {
#47 await this.handleOriginalPosition(cardId, prisma);
#48 return prisma.card.update({
where: { id: cardId },
data: { CardMisc: { update: { isArchived: true } } },
});
});
}
The above snippet has line #47-48, is there a way we could perform unit tests on code written inside transaction function?
We use similar transactions in lines: 65-77,98-109,133-203
Callum
02/15/2022, 9:41 AMSlackbot
02/15/2022, 12:05 PMCristian
02/15/2022, 12:33 PMGustavo Farias
02/15/2022, 1:24 PMAdam Szeptycki
02/15/2022, 1:28 PMqueryRawUnsafe
Ryan Gibbs
02/15/2022, 2:33 PMschema.prisma
file at runtime? I would have assumed that once the client is generated via prisma generate
and the typescript files are compiled then there would be no need to reference the schema file at all? 🤔
I am asking as I am currently getting the following issue at runtime:
Error: ENOENT: no such file or directory, open '...path/schema.prisma'
I assume it is caused by or related to this current issueLeonard Filip
02/15/2022, 4:29 PMprisma migrate dev
.
Error: Migration engine error:
Schema directory './project' already exists. This must be resolved manually (e.g. by moving the schema directory to another location).
This generator block inside `schema.prisma`:
generator client {
provider = "prisma-client-js"
binaryTargets = ["native", "rhel-openssl-1.0.x"]
output = "../node_modules/.project/service/db"
}
Has anyone seen this before?Slackbot
02/15/2022, 7:48 PMDennis Gyurics
02/15/2022, 10:30 PMUPDATE
, automatically?Peter Kellner
02/15/2022, 11:01 PMconst localData = await context.prisma.Sessions.findMany({
where: {
CodeCampYear: {
UrlPostToken: year
} || {
Id: codeCampYearId
}
},
select: {
Id: true,
CodeCampYearId: true,
Title: true,
CodeCampYear: {
select: {
Id: true,
UrlPostToken: true,
},
},
},
});
YeonHoPark
02/16/2022, 1:57 AMKelly Copley
02/16/2022, 5:12 AMIn aggregated query without GROUP BY, expression #1 of SELECT list contains nonaggregated column 'wcona.Session.id'; this is incompatible with sql_mode=only_full_group_by