Skip to content

Commit 42d6c00

Browse files
committed
save progress
1 parent 748b994 commit 42d6c00

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

orm/query_union.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
package orm
22

33
func (m Query[T]) Union(subquery SubQuery) Query[T] {
4-
return m.union(false, subquery)
4+
return m.union(false, subquery)
55
}
66
func (m Query[T]) UnionAll(subquery SubQuery) Query[T] {
7-
return m.union(true, subquery)
7+
return m.union(true, subquery)
88
}
99
func (m Query[T]) union(isAll bool, subquery SubQuery) Query[T] {
10-
subquery.unionAll = isAll
11-
m.unions = append(m.unions, subquery)
12-
return m
10+
subquery.unionAll = isAll
11+
m.setErr(subquery.err)
12+
m.unions = append(m.unions, subquery)
13+
return m
1314
}

0 commit comments

Comments
 (0)