Skip to content

Commit c2fd041

Browse files
committed
update error message
1 parent 3491413 commit c2fd041

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/schema/src/language-server/validator/datamodel-validator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ export default class DataModelValidator implements AstValidator<DataModel> {
377377
}
378378
accept(
379379
'error',
380-
`Field "${refField.name}" of Model "${containingModel.name}" is part of a one-to-one relation and must be marked as @unique or be part of a model-level @@unique attribute`,
380+
`Field "${refField.name}" on model "${containingModel.name}" is part of a one-to-one relation and must be marked as @unique or be part of a model-level @@unique attribute`,
381381
{ node: refField }
382382
);
383383
}

packages/schema/tests/schema/validation/datamodel-validation.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ describe('Data Model Validation Tests', () => {
521521
`)
522522
).toMatchObject(
523523
errorLike(
524-
`Field "aId" of Model "B" is part of a one-to-one relation and must be marked as @unique or be part of a model-level @@unique attribute`
524+
`Field "aId" on model "B" is part of a one-to-one relation and must be marked as @unique or be part of a model-level @@unique attribute`
525525
)
526526
);
527527

0 commit comments

Comments
 (0)