Skip to content

Commit

Permalink
fix deprecation for reflectProperty
Browse files Browse the repository at this point in the history
  • Loading branch information
tanner0101 committed Mar 22, 2018
1 parent 715e49e commit 0307bda
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/Fluent/Query/QueryField.swift
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ extension Dictionary where Key == QueryField {
extension KeyPath where Root: Model, Value: KeyStringDecodable {
/// See QueryFieldRepresentable.makeQueryField()
public func makeQueryField() throws -> QueryField {
let key = try Root.codingPath(forKey: self)
return QueryField(entity: Root.entity, name: key[0].stringValue)
let key = try Root.reflectProperty(forKey: self)
return QueryField(entity: Root.entity, name: key.path.first ?? "")
}
}

Expand Down

0 comments on commit 0307bda

Please sign in to comment.