BelongsToMany using pivot model when resources is in two separate database not using details from pivot model #6506
Unanswered
NowakAdmin
asked this question in
Ideas & Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description:
I have many to many relation where Products are stored in another database than Distribution. I tried few solutions but none seems working. I searched nova changelog to see if there was fixes for it and it seems that there were none. Nova keep search for distribution_product table in "corcel" connection. I want store distribution_product table in "mysql" connection.
I'm doing something wrong or it is a bug?
Distribution model:
DistributionProduct model:
Product model:
Detailed steps to reproduce the issue on a fresh Nova installation:
php artisan make:model -m Distribution
php artisan make:model -m Product
php artisan make:model -m DistributionProduct --pivot
php artisan nova:resource Distribution
php artisan nova:resource Product
php artisan migrate
add corcel mysql connection to config/database.php
updade models like in description
Error:
Beta Was this translation helpful? Give feedback.
All reactions