Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clone() does not clone modifiers (via Modify()) to the new query #4026

Open
2 tasks done
liamg opened this issue Apr 19, 2024 · 0 comments
Open
2 tasks done

Clone() does not clone modifiers (via Modify()) to the new query #4026

liamg opened this issue Apr 19, 2024 · 0 comments

Comments

@liamg
Copy link

liamg commented Apr 19, 2024

  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 馃槸

When I use Modify() on a query, and then Clone() that query, the cloned query does not include any of the modifiers.

Expected Behavior 馃

The clone and the original should be identical, including changes made by Modify()

Steps to Reproduce 馃暪

Steps:

  1. Create a query
  2. Make a change via Modify() e.g. join another table.
  3. Clone() the query.
  4. Compare the two queries - the original will have the modification, the clone will not.

Your Environment 馃寧

Tech Version
Go 1.22.2
Ent 0.12.5
Database Postgres
Driver https://github.com/jackc/pgx
@liamg liamg changed the title Clone() does not clone modifiers to the new query Clone() does not clone modifiers (via Modify()) to the new query Apr 19, 2024
@liamg liamg changed the title Clone() does not clone modifiers (via Modify()) to the new query Clone() does not clone modifiers (via Modify()) to the new query Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant