-
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
Update failed with hasManyThrough relationship #25740
Comments
I've found a temporary solution about this issue like this:
|
Specify the table name: $order->transactions()->update([
'transactions.customer_id' => 100,
'transactions.user_id' => 100
]); |
@standaniels Thank you. But, you know if I specified the table name but the problem still exists because the Have a look at this error:
I've experimented with below code by adding |
This is a more complex issue, see #13909. |
You can use this workaround: $order->transactions()->toBase()->update([
'transactions.customer_id' => 100,
'transactions.user_id' => 100,
'transactions.updated_at' => now()
]); |
Please close the issue. |
Will be fixed in Laravel 5.8: #26031 |
Description:
I've made a relationship with hasManyThrough and it's working perfectly to fetch data. But, When I'm trying to update I get this error below.
Steps To Reproduce:
Tables structures:
Relationships
What i expected to work
The text was updated successfully, but these errors were encountered: