Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ The `type` prop defaults to `"added"`, so the most common case is just `version`

<VersionBadge version="v4.3.0" />

The `@relation` directive allows you to define relationships between tables...
The `@relationship` directive allows you to define relationships between tables...
```

**Changed behavior:**
Expand Down
4 changes: 2 additions & 2 deletions reference/resources/query-optimization.md
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Comment thread
Ethan-Arrowood marked this conversation as resolved.
}
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")
}
```

Expand Down
8 changes: 4 additions & 4 deletions reference/rest/querying.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ GET /Product/?sort(+rating,-price)

<VersionBadge version="v4.3.0" />

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**:

Expand All @@ -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")
}
```

Expand Down Expand Up @@ -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")
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
```

Expand Down
8 changes: 4 additions & 4 deletions reference_versioned_docs/version-v4/rest/querying.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ GET /Product/?sort(+rating,-price)

<VersionBadge version="v4.3.0" />

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**:

Expand All @@ -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")
}
```

Expand Down Expand Up @@ -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")
}
```

Expand Down
4 changes: 2 additions & 2 deletions release-notes/v4-tucker/4.3.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
```

Expand Down