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

Add test case for embedded value selects #5901

Merged
merged 2 commits into from Dec 19, 2022

Conversation

emcfarlane
Copy link
Contributor

@emcfarlane emcfarlane commented Dec 5, 2022

Adds a testcase for embedded fields when selecting multiple row values. Current behaviour returns the last row value for the embbed ptr to all the structs.

What did this pull request do?

Adds a testcase currently. Looking into the issue.

--- FAIL: TestEmbeddedStruct (0.01s)
    embedded_struct_test.go:92: 0 &{ George }
    embedded_struct_test.go:94: expected author Edward got George
    embedded_struct_test.go:92: 1 &{ George }

User Case Description

Fix embedded struct ptrs. Reverted the optimisation for reusing structs here: #5388

@emcfarlane
Copy link
Contributor Author

emcfarlane commented Dec 5, 2022

Fixes #5575 and #5838

@emcfarlane emcfarlane marked this pull request as ready for review December 5, 2022 12:45
@jinzhu jinzhu merged commit 4ec73c9 into go-gorm:master Dec 19, 2022
@yyoshiki41 yyoshiki41 mentioned this pull request Dec 24, 2022
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.

None yet

2 participants