entc/gen: fix missing unique field in query builder template (#2332)

* fix(query): fix missing unique field in query builder template

when a query gets cloned the unique field doesn't get cloned

#2331

* fix(query): added missing go generate ./...

#2331

* fix(query): added missing go generate ./...

#2331
This commit is contained in:
MrParano1d
2022-02-15 21:31:05 +01:00
committed by GitHub
parent 818ce29c78
commit a75e9c5a8f
103 changed files with 279 additions and 176 deletions

View File

@@ -273,8 +273,9 @@ func (gq *GroupQuery) Clone() *GroupQuery {
predicates: append([]predicate.Group{}, gq.predicates...),
withUsers: gq.withUsers.Clone(),
// clone intermediate query.
sql: gq.sql.Clone(),
path: gq.path,
sql: gq.sql.Clone(),
path: gq.path,
unique: gq.unique,
}
}

View File

@@ -273,8 +273,9 @@ func (uq *UserQuery) Clone() *UserQuery {
predicates: append([]predicate.User{}, uq.predicates...),
withGroups: uq.withGroups.Clone(),
// clone intermediate query.
sql: uq.sql.Clone(),
path: uq.path,
sql: uq.sql.Clone(),
path: uq.path,
unique: uq.unique,
}
}