By getting an entry and save it without do any changes or just the title wipeout the relations.
modify the title
$entry = ee('Model')->get('ChannelEntry')->filter('entry_id', 1)->first();
$entry->title = 'updated Title';
$entry->save();
do nothing, just update
$entry = ee('Model')->get('ChannelEntry')->filter('entry_id', 1)->first();
$entry->save();
This was a problem in EE2 (https://support.ellislab.com/bugs/detail/19817/relationship-data-getting-cleared-when-using-channel-entry-api) and it seems now also in EE3 as a problem.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.