<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>absg</author_name>
  <author_url>https://blog.hatena.ne.jp/absg/</author_url>
  <blog_title>やったこと</blog_title>
  <blog_url>https://absg.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>CakePHP3で、あるテーブルのデータを別のテーブルにコピーする形でセーブする方法です。以下、「Draft_posts」テーブルのデータを「Posts」テーブルにコピーしています。 （※この二つのテーブルは全く同じ構造をしています） try{ //コピー元のデータを取得 $post = $this-&gt;Draft_posts-&gt;find()-&gt;where(['post_id' =&gt; 1234])-&gt;first(); //セーブ！ $entity = $this-&gt;Posts-&gt;newEntity(); $entity = $this-&gt;Posts-&gt;patchEntity($entity, $…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fabsg.hatenablog.com%2Fentry%2F2016%2F07%2F21%2F200906&quot; title=&quot;【CakePHP3】異なるテーブル間でデータをコピーする！ - やったこと&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2016-07-21 20:09:06</published>
  <title>【CakePHP3】異なるテーブル間でデータをコピーする！</title>
  <type>rich</type>
  <url>https://absg.hatenablog.com/entry/2016/07/21/200906</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
