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

automatic add GlobalScopes #181

Open
matheusbenedet opened this issue Jun 12, 2024 · 1 comment
Open

automatic add GlobalScopes #181

matheusbenedet opened this issue Jun 12, 2024 · 1 comment

Comments

@matheusbenedet
Copy link

The package documentation says that to apply global scopes we have to call $join->withGlobalScopes(), but if they are global scopes, it doesn't make sense for me to have to call them, it should be the other way around, if I don't want to, then yes I use withoutGlobalScopes(), but to avoid causing a break, I would suggest a package configuration file to set withGlobalScopes to true, then every join the package checks if it has global scopes and applies it if it does.

Thanks.

@luisdalmolin
Copy link
Member

That's reasonable, we are open to PRs if you have any rush on this. The reason to not apply this automatically is that SQL joins are not a 1-1 match with whatever other regular SQL query, so it can get tricky.

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