That should be as simple as doing
Parent.Id := ParentId; Child.Id := ChildId; Child.Parent := Parent;