File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed
packages/language/src/validators
tests/e2e/prisma-consistency Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 77 - [x] migrate
88 - [x] info
99 - [x] init
10- - [ ] validate
10+ - [x ] validate
1111 - [ ] format
1212 - [ ] db seed
1313- [ ] ORM
Original file line number Diff line number Diff line change @@ -273,7 +273,7 @@ export default class DataModelValidator implements AstValidator<DataModel> {
273273 // Use name because the current document might be updated
274274 let oppositeFields = getModelFieldsWithBases ( oppositeModel , false ) . filter (
275275 ( f ) =>
276- f . name !== field . name && // exclude self
276+ f !== field && // exclude self in case of self relation
277277 f . type . reference ?. ref ?. name === contextModel . name ,
278278 ) ;
279279 oppositeFields = oppositeFields . filter ( ( f ) => {
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ class ZenStackValidationTester {
5252 writeFileSync ( this . schemaPath , schema ) ;
5353
5454 try {
55- const result = execSync ( `node ${ this . cliPath } generate` , {
55+ execSync ( `node ${ this . cliPath } generate` , {
5656 cwd : this . testDir ,
5757 stdio : 'pipe' ,
5858 encoding : 'utf8' ,
You can’t perform that action at this time.
0 commit comments