mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-28 04:24:20 +00:00
Move firstInMany flag in SQLRelation
This commit is contained in:
1 parent
da63037948
commit
8057572357
3 files changed
+27
-38
No files matched your search
@@ -496,10 +496,11 @@ private struct SQLQualifiedRelation {
|
||||
return nil
|
||||
}
|
||||
|
||||
if child.firstOnly {
|
||||
if child.relation.firstInMany {
|
||||
// Filters and order are handled in a subquery,
|
||||
// and only keep children with a non-empty selection
|
||||
let relation = child.relation
|
||||
.with(\.firstInMany, false)
|
||||
.unfiltered()
|
||||
.unordered()
|
||||
.filteringChildren { $0.relation.selection.isEmpty == false }
|
||||
|
||||
Reference in new issue
Block a user