You should loop through the relationAttributes and set every one of them on the node

```
foreach ($link->getRelationAttributes() as $attributeName => $attributeValue) {
    $entryNode->setAttribute($attributeName, $attributeValue);
}
```