user
09/07/2021, 6:25 PMNathaniel Babalola
09/07/2021, 7:10 PMprisma migrate dev
doesn't workChip Clark
09/07/2021, 9:43 PMHRDepartment
, JobTitle
, JobType
, LegalDepartment
, OfficeLocation
, Person
, Photo
are updated or deleted, the referential actions on the relations cascade to model PersonRelationship
through multiple paths. Please break one of these paths by setting the onUpdate
and onDelete
to NoAction
. (Implicit default `onUpdate`: Cascade
) Read more at https://pris.ly/d/cyclic-referential-actions
--> schema.prisma:602
|
601 | ValidToDate DateTime
602 | RelatedPerson Person @relation(name: "RelatedPerson", fields: [RelatedPersonID], references: [PKPersonID])
603 | SupportedPerson Person @relation(name: "SupportedPerson", fields: [RelatedPersonID], references: [PKPersonID])
model PersonRelationship {
PersonRelationshipID Int @id @default(autoincrement())
PKPersonID Int
RelationshipTypeID Int
RelatedPersonID Int
Description String? @db.VarChar(Max)
Active Boolean
ActiveFromDate DateTime @db.Date
ModifiedDate DateTime @db.DateTime
ModifiedBy String @db.VarChar(30)
ValidFromDate DateTime
ValidToDate DateTime
RelatedPerson Person @relation(name: "RelatedPerson", fields: [RelatedPersonID], references: [PKPersonID], onDelete: NoAction, onUpdate: NoAction)
SupportedPerson Person @relation(name: "SupportedPerson", fields: [RelatedPersonID], references: [PKPersonID], onDelete: NoAction, onUpdate: NoAction)
Person Person @relation(name: "PrimaryPerson", fields: [PKPersonID], references: [PKPersonID], onDelete: NoAction, onUpdate: NoAction)
RelationshipType RelationshipType @relation(fields: [RelationshipTypeID], references: [RelationshipTypeID])
@@unique([PKPersonID, RelatedPersonID, RelationshipTypeID], name: "nclunq_PersonRelationship_PKPersonID_RelatedPersonID_RelationshipTypeID")
}
kkangsan
09/08/2021, 6:56 AMDev__
09/08/2021, 9:53 AMschema.prisma
file my editor is showing that orderByRelation
and referentialActions
are deprecated as preview features. But as far as I understood these are non-preview feature in the latest v3 of prisma. isnt this misleading, what If I removed those feature, it then would break my application because I havent upgraded to v3?Harsha MV
09/08/2021, 10:12 AMPhil Bookst
09/08/2021, 11:47 AMAsh B
09/08/2021, 1:12 PMHarsha MV
09/08/2021, 1:55 PMHarsha MV
09/08/2021, 1:55 PMHarsha MV
09/08/2021, 1:56 PMHarsha MV
09/08/2021, 1:56 PMHarsha MV
09/08/2021, 1:56 PMprojectCategoryId String
Harsha MV
09/08/2021, 1:57 PMKent C. Dodds
09/08/2021, 1:58 PMHarsha MV
09/08/2021, 2:33 PMAndrés Rodríguez
09/08/2021, 3:36 PMTRUNCATE
command (postgres). However, the example here doesn’t work. Throws the following error:
PrismaClientValidationError: `$queryRaw` is a tag function, please use it like the following:
const result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'<mailto:user@email.com|user@email.com>'};`
Now, if I make this change:
await prisma.$queryRaw`TRUNCATE TABLE "public"."${tablename}" CASCADE;`;
I get the following error:
Invalid `prisma.queryRaw()` invocation:
Your raw query had an incorrect number of parameters. Expected: `0`, actual: `1`.
I know the other option would be using many deleteMany()
but I want to try using TRUNCATE
before I get into the weeds there. I’m using the latest versions (3.0.1)Tyler Clendenin
09/08/2021, 7:18 PMFrancisco
09/08/2021, 10:49 PMFrancisco
09/08/2021, 10:50 PMPierre Ortega
09/08/2021, 11:43 PMGelo
09/09/2021, 12:22 AMGelo
09/09/2021, 12:22 AMAhmed Adly
09/09/2021, 12:59 AMGelo
09/09/2021, 3:03 AMVenu
09/09/2021, 7:53 AM@Injectable()
export class AuthService {
constructor(
private readonly userService: UserService,
private readonly jwtService: JwtService,
) {}
validate(userCreds: Prisma.UserWhereUniqueInput, password: string): UserModel | null {
const user = this.userService.getUserByEmail(userCreds);
if (!user) {
return null;
}
let returnedUserPassword = user.
Daniel Norman
Jürgen
09/09/2021, 5:26 PMUnknown arg `brand_id` in data.brand_id for type ....CreateInput. Did you mean `brands`?
while my schema and my model clearly has the member brand_id
. I know there is an alternative method with using connect
though i actually don’t want to use it. als the TS typing shows an XOR between these two variants.
Any clues?Harsha MV
09/09/2021, 8:17 PMPrismaClient is unable to be run in the browser.
Am getting this error when I try to create a record from a component.
*Do I need to send it back to pages/<file> to run the <http://prima.cr|prima.cr>*eate
functionHarjaap Singh Makkar
09/09/2021, 8:55 PMprisma.listing.create()
invocation:\n\n\n read ECONNRESET"}. Any help would be awesome, thank you!