-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
[5.4] Related model connection after upgrade to 5.4 #17511
Comments
themsaid
changed the title
Related model connection after upgrade to 5.4
[5.4] Related model connection after upgrade to 5.4
Jan 24, 2017
In 5.4 related models are queried based on the parent's connection, do you use Passport for this or a custom implementation? |
Yep, I have just found #16103. I use Passport. As I understand, I should clearly setup connection for passport's models? |
Yes you need to set a connection for passport models if the parent model is on a non-default connection. |
Thanks. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description:
Hello. I have a simple application based on Laravel to provide OAuth2 service. User's table maintained by another application and stored in another database.
So, I use 2 database connections - default connection for Laravel application (where applied migrations from laravel/passport) and secondary connection, where stored user's table.
In User model I specified custom database connection and on Laravel 5.3.x version it works properly.
After updating to 5.4 version, when I try to get acces to user's tokens (
oauth/tokens
endpoint) I see an error - application trying to findoauth_access_tokens
table in secondary connection, while this table on primary connection.I think the problem is that parent's model connection settings obtained by related model.
The text was updated successfully, but these errors were encountered: