-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Regression of Scan when loading pointer object in a struct #5575
Comments
…ues to `Scan()` (#5388) * fix: reduce allocations when slice of values * chore[test]: Add benchmark for scan * chore[test]: add bench for scan slice * chore[test]: add bench for slice pointer and improve tests * chore[test]: make sure database is empty when doing slice tests * fix[test]: correct sql delete statement * enhancement: skip new if rows affected = 0
related to #5431 |
I've also observed this issue which is blocking us from upgrading. |
@jinzhu Any update on this one? I tried with gorm v1.23.9 and the problem still exists. I can put together a sample program if that would help. |
@jinzhu any thoughts around the behavior change introduced with this update? |
@jinzhu I agree with @a631807682 #5431 (comment), revert #5388 solves this problem. reproduction code
output
|
@jinzhu any updates on a fix for this one (or a plan when to fix it)? We are still holding back to |
Duplicated issues: #5838 |
GORM Playground Link
go-gorm/playground#504
Description
There seems to have been a regression from
v1.23.5
tov1.23.6
where loading objects with a pointer struct embed will result in that pointer struct being duplicated across all objects loaded. The commit that caused the regression seems to be this: d01de72. There are already two comments on this commit mentioning this behavior.Can we expect a fix to change this behavior back to not duplicating embed structs across object loads?
The text was updated successfully, but these errors were encountered: