Usage: an object has one child and we want to also copy the child and add it to the copied into parent ...
Signature
public function copyHasOneRelation(DataObject
$copyFromParent,
DataObject
$newObjectParent,
String
$relationalFieldForChildWithoutID,
[string
$relationalFieldForParentWithoutID = ""] )
Parameters
$copyFromParent
—
object
$newObjectParent
—
object
$relationalFieldForChildWithoutID
—
object
-
$relationalFieldForParentWithoutID
—
string
- if it is a has_one to has_one relationship only!!! this is the field on the parent that provides its child (the single-child / has one child )WITHOUT the ID part.