From 01b42069c726b329eacab7282df8c4947dfe09b4 Mon Sep 17 00:00:00 2001 From: Ethan Arrowood Date: Thu, 9 Jul 2026 07:59:11 -0400 Subject: [PATCH 1/2] docs: fix incorrect @relation directive to @relationship --- CONTRIBUTING.md | 2 +- reference/resources/query-optimization.md | 4 ++-- reference/rest/querying.md | 8 ++++---- .../version-v4/resources/query-optimization.md | 4 ++-- reference_versioned_docs/version-v4/rest/querying.md | 8 ++++---- 5 files changed, 13 insertions(+), 13 deletions(-) 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") } ``` From aeb326c443c412d2b7ff1692ce7e0aec5d4f21da Mon Sep 17 00:00:00 2001 From: Ethan Arrowood Date: Thu, 9 Jul 2026 10:23:41 -0400 Subject: [PATCH 2/2] docs: fix remaining @relation occurrences in 4.3.0 release notes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Addresses review feedback on PR #577 — two occurrences in the release-notes example were missed by the original rename. Co-Authored-By: Claude Fable 5 --- release-notes/v4-tucker/4.3.0.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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") } ```