/**
  * Update the relationship between a post and its parent post.
  *
  * @param Post $post
  */
 public function update_parent_post_relation(Post $post)
 {
     $parent = $post->get_parent();
     if (!$parent) {
         return;
     }
     // Get production IDs.
     $prod_id = $this->post_dao->get_id_by_guid($post->get_guid());
     $parent_prod_id = $this->post_dao->get_id_by_guid($parent->get_guid());
     if (!$prod_id) {
         $msg = sprintf('No post with GUID %s found on production.', $post->get_guid());
         $this->api->add_deploy_message($this->batch->get_id(), $msg, 'error');
         return;
     }
     if (!$parent_prod_id) {
         $msg = sprintf('No post with GUID %s found on production.', $parent->get_guid());
         $this->api->add_deploy_message($this->batch->get_id(), $msg, 'error');
         return;
     }
     $this->post_dao->update(array('post_parent' => $parent_prod_id), array('ID' => $prod_id), array('%d'), array('%d'));
 }