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

Generated relationships does not have a G variant #87

Closed
eduacostam opened this issue Jan 9, 2017 · 2 comments
Closed

Generated relationships does not have a G variant #87

eduacostam opened this issue Jan 9, 2017 · 2 comments

Comments

@eduacostam
Copy link

When setting up sqlboiler using boil.SetDB(db) we can use global variants of methods for accessing data instead of passing a *sql.DB pointer around. Generated relationships between models do not have a global variant.

What I would expect is that for each AddX, SetX, RemoveX there would be a G variant AddXG, SetXG, RemvoeXG.

As it is I started using the G variants to avoid passing an *sql.DB instance to all my structs, but in order to use relationships the struct must have knowledge of the DB object anyway.

@aarondl
Copy link
Member

aarondl commented Jan 10, 2017

Hey there @eduacostam, I've corrected the issue on the dev branch and all our integration tests are passing. Can you double check to make sure everything's there that you expect and then we'll release this version of sqlboiler. Thanks!

@eduacostam
Copy link
Author

Hey @aarondl, thanks again for the fast response and turnaround time!
I've just checked it and it seems to be as expected!
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

No branches or pull requests

2 participants