diff --git a/packages/schema/src/language-server/validator/datamodel-validator.ts b/packages/schema/src/language-server/validator/datamodel-validator.ts index 65bad6bc0..b4e17e56c 100644 --- a/packages/schema/src/language-server/validator/datamodel-validator.ts +++ b/packages/schema/src/language-server/validator/datamodel-validator.ts @@ -377,7 +377,7 @@ export default class DataModelValidator implements AstValidator { } accept( 'error', - `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`, + `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`, { node: refField } ); } diff --git a/packages/schema/tests/schema/validation/datamodel-validation.test.ts b/packages/schema/tests/schema/validation/datamodel-validation.test.ts index 97b35b6ee..e0778da51 100644 --- a/packages/schema/tests/schema/validation/datamodel-validation.test.ts +++ b/packages/schema/tests/schema/validation/datamodel-validation.test.ts @@ -521,7 +521,7 @@ describe('Data Model Validation Tests', () => { `) ).toMatchObject( errorLike( - `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` + `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` ) );