We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 748b994 commit 42d6c00Copy full SHA for 42d6c00
orm/query_union.go
@@ -1,13 +1,14 @@
1
package orm
2
3
func (m Query[T]) Union(subquery SubQuery) Query[T] {
4
- return m.union(false, subquery)
+ return m.union(false, subquery)
5
}
6
func (m Query[T]) UnionAll(subquery SubQuery) Query[T] {
7
- return m.union(true, subquery)
+ return m.union(true, subquery)
8
9
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
+ subquery.unionAll = isAll
+ m.setErr(subquery.err)
+ m.unions = append(m.unions, subquery)
13
+ return m
14
0 commit comments