Skip to content

Commit fcb5be1

Browse files
committed
update
1 parent 08a065a commit fcb5be1

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

TODO.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
- [x] migrate
88
- [x] info
99
- [x] init
10-
- [ ] validate
10+
- [x] validate
1111
- [ ] format
1212
- [ ] db seed
1313
- [ ] ORM

packages/language/src/validators/datamodel-validator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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) => {

tests/e2e/prisma-consistency/zmodel-validation.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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',

0 commit comments

Comments
 (0)