Hi,
If you want to force only one connection from one side of a relationship, please set 'max_clone' => 1
to the field on that side, like this:
add_action( 'mb_relationships_init', function () {
MB_Relationships_API::register(
array(
'id' => 'workout_to_workout_exercises',
'from' => array(
'object_type' => 'post',
'post_type' => 'workout',
'field' => array(
'max_clone' => 1, // Limit to 1 connection only.
),
),
'to' => array(
'object_type' => 'post',
'post_type' => 'workout_exercises',
),
)
);
} );