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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: AfterQuery should clear FROM Clause's Joins rather than the Stat… #7027

Merged
merged 1 commit into from
Jun 12, 2024

Conversation

liov
Copy link
Contributor

@liov liov commented May 17, 2024

  • Do only one thing
  • Non breaking API changes
  • Tested

What did this pull request do?

fix #7025

User Case Description

There are two options. The first is to choose to clear the Joins in the fromClause each time and regenerate them for every query, which would be somewhat less performant. The second option involves adding cached fields within the fromClause's Joins, allowing subsequent queries to utilize these caches. In this case, the first option has been selected.

Of course, there is still room for optimization here.

@jinzhu jinzhu merged commit 9c4070e into go-gorm:master Jun 12, 2024
30 of 35 checks passed
bhowmik-abhijeet pushed a commit to bhowmik-abhijeet/gorm that referenced this pull request Aug 9, 2024
bhowmik-abhijeet pushed a commit to bhowmik-abhijeet/gorm that referenced this pull request Aug 11, 2024
bhowmik-abhijeet pushed a commit to bhowmik-abhijeet/gorm that referenced this pull request Aug 11, 2024
jinzhu pushed a commit that referenced this pull request Aug 22, 2024
…oin added as part of #7027 (#7153)

Co-authored-by: Abhijeet Bhowmik <abhijeet.bhowmik@cambiumnetworks.com>
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

Successfully merging this pull request may close these issues.

Executing count will clear Statement.Joins
2 participants