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: unsupported data on nested joins with preloads #6957

Merged
merged 4 commits into from
Jun 12, 2024

Conversation

N-Schaef
Copy link
Contributor

@N-Schaef N-Schaef commented Apr 11, 2024

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

What did this pull request do?

This PR fixes issue #6956.

It adds reflect.Pointer as an valid reflect target for preloads.
This seems to be required for preloads of nested optional joins with preload targets.

I am not 100% sure of the broader implications of this change. But the implementation before #6877 also allowed this usecase.

User Case Description

We have complex queries with nested joins and preloads that worked on version 1.25.5 but do not work with the current version.

@jinzhu
Copy link
Member

jinzhu commented Apr 15, 2024

Hi @N-Schaef

Can you add some test cases to make sure it works?

Thank you.

@N-Schaef
Copy link
Contributor Author

N-Schaef commented May 2, 2024

Hello @jinzhu,

sorry for the late reply. I've been on vacation.

I have added a test-case that results in the error on the main branch but works with the changes.

But somehow an (in my opinion) unrelated error now fails on the mysql:latest.
I'm not sure whats broken there.

@N-Schaef
Copy link
Contributor Author

Is there anything left to do?

@jinzhu jinzhu merged commit 3fe7fcf into go-gorm:master Jun 12, 2024
30 of 34 checks passed
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.

3 participants