thread '<unnamed>' panicked at 'Every RelationInfo should have a complementary RelationInfo on the opposite relation field.'
See original GitHub issueprisma validate/format
crash on this schema:
datasource db {
provider = "sqlserver"
url = env("DATABASE_URL")
}
generator client {
provider = "prisma-client-js"
}
model Test {
id Int @id
fk Int
testparent TestParent @relation(fields: [fk], references: [id])
}
model TestParent {
id Int @id
tests Test[]
fk Int
self TestParent @relation(fields: [fk], references: [id])
}
with:
thread '<unnamed>' panicked at 'Every RelationInfo should have a complementary RelationInfo on the opposite relation field.', libs\datamodel\connectors\dml\src\datamodel.rs:165:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Error: Unexpected token E in JSON at position 0
This is surprising, as usually the missing backrelation validation works fine, e.g. when you only have the second model without the relation to the first one:
model TestParent {
id Int @id
fk Int
self TestParent @relation(fields: [fk], references: [id])
}
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Prisma 3.3.0 Release - GitClear
ci(publish): take major version into account for calculating patch ... thread '<unnamed>' panicked at 'Every RelationInfo should have a complementary ...
Read more >Seven Days, June 5, 2019 by Seven Days - Issuu
As state pot laws “Just because you have a card doesn't become more permissive, mean you could do that anywhere,” Rivers some wonder...
Read more >SELF ASSESSMENT REPORT POST GRADUATE ...
Responsible for IT & other related academic infrastructure. ... Need to complement all management domain with latest IT tools.
Read more >Jewish Standard, March 11, 2016 - Scribd
know if it will get to that point because ... was crucial to create understanding of, and relationships with, each other.
Read more >https://oa.upm.es/cgi/search/archive/advanced?outp...
Just we need to print in our clothes the patterns or markers that our ... spa relation: info:eu-repo/grantAgreement/EC/FP7/AFRICA-2010%2F99621 rights: ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Confirmed fixed in v3.2.1
FYI - this is in production with NestJS 7.6.0
Can you please confirm this is also fixed for you with 3.2.x @ChipClark?