Can't save pivot data

with OC 3.5.x, no error no exception the code just stopped at the $mypivot->save() when I try to update a relationship and some jsonable inside.
The code is using a pivot model

Can you provide any code, that can help us resolve your problem?

mostly the code is $mypivot->save() after updating some variable in the pivot instance such as

$mypivot = UserCoursePivot::where('course_id', $id)->where('user_id', $user_id)->first();
$mypivot->current_module = $next_module;
$mypivot->last_digest_at = $now;

I think the issue is coming from manipulating a pivot model directly.

the table of the pivot model does not have an id column, so maybe that’s why the save method is having trouble to work?

Yeah, you’re probably right that the problem comes from saving the data directly with the pivot model.
I would suggest that you either go the relation attach route (especially if you are using model or relation events or other triggers - might come in handy if I’m interpreting your code correctly) or use the DB facade if you really want to circumvent everything.

If you are adamant on using the pivot model directly, you might find something in the trait \Illuminate\Database\Eloquent\Relations\Concerns\AsPivot, function setKeysForSaveQuery.

yeah that was the problem, I used another model to access the pivot data, update adn save them without issue.