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

Use pkg name in tableMap for unique cache keys #479

Merged
merged 1 commit into from
Nov 29, 2019

Conversation

aeneasr
Copy link
Member

@aeneasr aeneasr commented Nov 29, 2019

When using two structs from different packages where both structs have the same name as models, the tableMap would incorrectly set up as only the struct's name is used as the cache key.

This patch uses the package path and the struct name to generate unique cache keys across go projects.

Closes #477

When using two structs from different packages where both structs have the same name as models, the `tableMap` would incorrectly set up as only the struct's name is used as the cache key.

This patch uses the package path and the struct name to generate unique cache keys across go projects.

Closes gobuffalo#477

Signed-off-by: aeneasr <aeneas@ory.sh>
@aeneasr aeneasr requested a review from a team as a code owner November 29, 2019 09:33
@aeneasr
Copy link
Member Author

aeneasr commented Nov 29, 2019

@stanislas-m this supersedes #478 . I've also added a failing test case to prevent future regressions.

@stanislas-m stanislas-m merged commit d9c4e3c into gobuffalo:development Nov 29, 2019
@stanislas-m
Copy link
Member

Thanks!

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