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 (pq *PetQuery) Clone() *PetQuery {
|
||||
predicates: append([]predicate.Pet{}, pq.predicates...),
|
||||
withOwner: pq.withOwner.Clone(),
|
||||
// clone intermediate query.
|
||||
sql: pq.sql.Clone(),
|
||||
path: pq.path,
|
||||
sql: pq.sql.Clone(),
|
||||
path: pq.path,
|
||||
unique: pq.unique,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -273,8 +273,9 @@ func (uq *UserQuery) Clone() *UserQuery {
|
||||
predicates: append([]predicate.User{}, uq.predicates...),
|
||||
withPets: uq.withPets.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