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

[Preload] Bug pointer/struct #42

Open
novln opened this issue Oct 11, 2018 · 0 comments
Open

[Preload] Bug pointer/struct #42

novln opened this issue Oct 11, 2018 · 0 comments
Labels

Comments

@novln
Copy link
Collaborator

novln commented Oct 11, 2018

Let's define 3 models:

type Project struct {
    User User
}

type User struct {
    Avatar *Avatar
}

type Avatar struct {

}

Using makroud.WithPreloadField("User.Avatar") on a Project is not working if User is a struct.
However, it's working if User is a pointer.

I think there is an error on the preload mechanism, it should mutate user with new value.

Thank @edouardparis for spotting this issue.

@novln novln changed the title Bug preload [Preload] Bug pointer/struct Oct 12, 2018
@novln novln added the bug label Oct 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant