Association documentation

This commit is contained in:
Gwendal Roué committed 2019-05-20 07:28:59 +02:00
1 parent 62557343a1
commit fde53b13c6
1 file changed
+3 -1
+3 -1
View File
@@ -423,7 +423,7 @@ migrator.registerMigration("Employees") { db in
}
```
Note that both sides of the self-join use a customized [association key]. This helps consuming this association. For example:
Note that both sides of the self-join use a customized **[association key](#the-structure-of-a-joined-request)**. This helps consuming this association. For example:
```swift
struct EmployeeInfo: FetchableRecord, Decodable {
@@ -439,6 +439,8 @@ let request = Employee
let employeeInfos: [EmployeeInfo] = try EmployeeInfo.fetchAll(db, request)
```
See [Fetching Values from Associations] for more information.
Associations and the Database Schema
====================================