Method
updateOpposite(targetId:oppositeRefId:sourceId:add:)
Updates the opposite side of a bidirectional reference across resources.
func updateOpposite(targetId: EUUID, oppositeRefId: EUUID, sourceId: EUUID, add: Bool) async
Parameters
targetId-
The unique identifier of the target object to update.
oppositeRefId-
The unique identifier of the opposite reference feature.
sourceId-
The unique identifier of the source object establishing the relationship.
add-
Whether to add (
true) or remove (false) the bidirectional relationship.
Discussion
This method is used by Resource to coordinate opposite reference updates when the target object is in a different resource. The method automatically determines if the opposite reference is multi-valued by examining the target object’s metamodel.