entc/gen: add eager-load edges to query clone (#888)

Closed #878
This commit is contained in:
Ariel Mashraki
2020-10-27 21:16:30 +02:00
committed by GitHub
parent fb97ca66ac
commit 967c10819a
77 changed files with 459 additions and 104 deletions

View File

@@ -222,6 +222,9 @@ func (uq *UserQuery) ExistX(ctx context.Context) bool {
// Clone returns a duplicate of the query builder, including all associated steps. It can be
// used to prepare common query builders and use them differently after the clone is made.
func (uq *UserQuery) Clone() *UserQuery {
if uq == nil {
return nil
}
return &UserQuery{
config: uq.config,
limit: uq.limit,