diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 45dbb79c..6fc4e454 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -185,7 +185,7 @@ The `type` prop defaults to `"added"`, so the most common case is just `version`
-The `@relation` directive allows you to define relationships between tables...
+The `@relationship` directive allows you to define relationships between tables...
```
**Changed behavior:**
diff --git a/reference/resources/query-optimization.md b/reference/resources/query-optimization.md
index 646d86aa..dfe2cf9d 100644
--- a/reference/resources/query-optimization.md
+++ b/reference/resources/query-optimization.md
@@ -95,12 +95,12 @@ Example of an indexed foreign key that enables efficient join queries:
type Product @table {
id: Long @primaryKey
brandId: Long @indexed # foreign key — index this
- brand: Related @relation(from: "brandId")
+ brand: Related @relationship(from: "brandId")
}
type Brand @table {
id: Long @primaryKey
name: String @indexed # indexed — enables efficient brand.name queries
- products: Product @relation(to: "brandId")
+ products: Product @relationship(to: "brandId")
}
```
diff --git a/reference/rest/querying.md b/reference/rest/querying.md
index b11f0ff4..e8c564c7 100644
--- a/reference/rest/querying.md
+++ b/reference/rest/querying.md
@@ -179,7 +179,7 @@ GET /Product/?sort(+rating,-price)
-Harper supports querying across related tables through dot-syntax chained attributes. Relationships must be defined in the schema using `@relation`.
+Harper supports querying across related tables through dot-syntax chained attributes. Relationships must be defined in the schema using `@relationship`.
**Schema example**:
@@ -188,12 +188,12 @@ type Product @table @export {
id: Long @primaryKey
name: String
brandId: Long @indexed
- brand: Brand @relation(from: "brandId")
+ brand: Brand @relationship(from: "brandId")
}
type Brand @table @export {
id: Long @primaryKey
name: String
- products: [Product] @relation(to: "brandId")
+ products: [Product] @relationship(to: "brandId")
}
```
@@ -225,7 +225,7 @@ type Product @table @export {
id: Long @primaryKey
name: String
resellerIds: [Long] @indexed
- resellers: [Reseller] @relation(from: "resellerId")
+ resellers: [Reseller] @relationship(from: "resellerId")
}
```
diff --git a/reference_versioned_docs/version-v4/resources/query-optimization.md b/reference_versioned_docs/version-v4/resources/query-optimization.md
index 9951a3c9..2cf0f48e 100644
--- a/reference_versioned_docs/version-v4/resources/query-optimization.md
+++ b/reference_versioned_docs/version-v4/resources/query-optimization.md
@@ -80,12 +80,12 @@ Example of an indexed foreign key that enables efficient join queries:
type Product @table {
id: Long @primaryKey
brandId: Long @indexed # foreign key — index this
- brand: Related @relation(from: "brandId")
+ brand: Related @relationship(from: "brandId")
}
type Brand @table {
id: Long @primaryKey
name: String @indexed # indexed — enables efficient brand.name queries
- products: Product @relation(to: "brandId")
+ products: Product @relationship(to: "brandId")
}
```
diff --git a/reference_versioned_docs/version-v4/rest/querying.md b/reference_versioned_docs/version-v4/rest/querying.md
index 3c6da680..d15f4bfd 100644
--- a/reference_versioned_docs/version-v4/rest/querying.md
+++ b/reference_versioned_docs/version-v4/rest/querying.md
@@ -179,7 +179,7 @@ GET /Product/?sort(+rating,-price)
-Harper supports querying across related tables through dot-syntax chained attributes. Relationships must be defined in the schema using `@relation`.
+Harper supports querying across related tables through dot-syntax chained attributes. Relationships must be defined in the schema using `@relationship`.
**Schema example**:
@@ -188,12 +188,12 @@ type Product @table @export {
id: Long @primaryKey
name: String
brandId: Long @indexed
- brand: Brand @relation(from: "brandId")
+ brand: Brand @relationship(from: "brandId")
}
type Brand @table @export {
id: Long @primaryKey
name: String
- products: [Product] @relation(to: "brandId")
+ products: [Product] @relationship(to: "brandId")
}
```
@@ -225,7 +225,7 @@ type Product @table @export {
id: Long @primaryKey
name: String
resellerIds: [Long] @indexed
- resellers: [Reseller] @relation(from: "resellerId")
+ resellers: [Reseller] @relationship(from: "resellerId")
}
```
diff --git a/release-notes/v4-tucker/4.3.0.md b/release-notes/v4-tucker/4.3.0.md
index 4d7e82fb..32ce135d 100644
--- a/release-notes/v4-tucker/4.3.0.md
+++ b/release-notes/v4-tucker/4.3.0.md
@@ -19,13 +19,13 @@ type Product @table {
# foreign key used to reference a brand
brandId: ID @indexed
# many-to-one relationship to brand
- brand: Related @relation(from: "brandId")
+ brand: Related @relationship(from: "brandId")
}
type Brand @table {
id: ID @primaryKey
name: String @indexed
# one-to-many relationship of brand to products of that brand
- products: Product @relation(to: "brandId")
+ products: Product @relationship(to: "brandId")
}
```