mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
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:
@@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user