-
-
Notifications
You must be signed in to change notification settings - Fork 519
Fix Clone() in Query. #748
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes the Clone() method in the Query class to perform deep cloning instead of shallow cloning, addressing issue #747. The fix ensures that nested objects like Parent queries and Includes are properly cloned rather than sharing references.
- Implements deep cloning for Parent query references
- Adds proper cloning for Includes collection with new Clone() method
- Creates independent copy of Variables dictionary
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
QueryBuilder/Query.cs | Updates Clone() method to deep clone Parent, Includes, and Variables properties |
QueryBuilder/Include.cs | Adds new Clone() method to enable deep cloning of Include objects |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
@cemahseri the PR is failing to build |
c3ae82e
to
981f444
Compare
copilot is high on k2/spice, don't trust it. the pr builds just fine
|
I was trying to build it locally but maybe I was missing something, I will try again tonight |
Fixes: #747