This commit is contained in:
Gwendal Roué committed 2020-04-28 14:20:05 +02:00
1 parent 0b0f0e53da
commit f543784241
1 file changed
+1
@@ -98,6 +98,7 @@ extension QueryInterfaceRequest: FetchRequest {
let pivotAlias = TableAlias()
let prefetchedRelation = association
.map(\.pivot.relation, { $0.qualified(with: pivotAlias) })
// TODO: we may miss columns in the output region since we don't pass any row below
.destinationRelation(fromOriginRows: { _ in [] /* no origin row */ })
.annotated(with: pivotColumns.map { pivotAlias[Column($0)].forKey("grdb_\($0)") })
let prefetchedQuery = SQLQuery(relation: prefetchedRelation)