Skip to content

Commit

Permalink
Merge branch 'release'
Browse files Browse the repository at this point in the history
  • Loading branch information
tanner0101 committed Jul 17, 2018
2 parents 1197e22 + 4830e25 commit 270b6fa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Sources/Fluent/Relations/Children.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ public struct Children<Parent, Child>

/// Internal parent ID storage.
internal enum ParentIDStorage {
case optional(WritableKeyPath<Child, Parent.ID?>)
case required(WritableKeyPath<Child, Parent.ID>)
case optional(KeyPath<Child, Parent.ID?>)
case required(KeyPath<Child, Parent.ID>)
}

/// Reference to the foreign key on the child.
Expand Down Expand Up @@ -71,7 +71,7 @@ extension Model {
/// }
///
/// The `parentID` should refer to the field on the child entity that contains the parent's ID.
public func children<Child>(_ parentID: WritableKeyPath<Child, Self.ID>) -> Children<Self, Child> {
public func children<Child>(_ parentID: KeyPath<Child, Self.ID>) -> Children<Self, Child> {
return Children(parent: self, parentID: .required(parentID))
}

Expand All @@ -82,7 +82,7 @@ extension Model {
/// }
///
/// The `parentID` should refer to the field on the child entity that contains the parent's ID.
public func children<Child>(_ parentID: WritableKeyPath<Child, Self.ID?>) -> Children<Self, Child> {
public func children<Child>(_ parentID: KeyPath<Child, Self.ID?>) -> Children<Self, Child> {
return Children(parent: self, parentID: .optional(parentID))
}
}

0 comments on commit 270b6fa

Please sign in to comment.