<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>Saku-Saku</author_name>
  <author_url>https://blog.hatena.ne.jp/Saku-Saku/</author_url>
  <blog_title>SakuraWi - BLog</blog_title>
  <blog_url>https://sakurawi.hateblo.jp/</blog_url>
  <categories>
    <anon>技術</anon>
    <anon>技術-RubyonRails</anon>
  </categories>
  <description>自身が他のテーブルをたどるキーを所持している場合は、belongs_to 自身が他のテーブルからたどるキーで示されている場合は、has_one belongs_to class Book &lt; ApplicationRecord belongs_to :author end と書くとすると Bookテーブルが、author_idをカラムに持っていてAuthorをたどれます。 has_one class Supplier &lt; ApplicationRecord has_one :account end Supplierのテーブルにはaccountのidなどはもっていません。 しかし、Account…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsakurawi.hateblo.jp%2Fentry%2F2017%2F10%2F03%2Fhas_one%25E3%2581%25A8belongs_to%25E3%2581%25AE%25E9%2581%2595%25E3%2581%2584&quot; title=&quot;has_oneとbelongs_toの違い - SakuraWi - BLog&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>2017-10-03 00:06:07</published>
  <title>has_oneとbelongs_toの違い</title>
  <type>rich</type>
  <url>https://sakurawi.hateblo.jp/entry/2017/10/03/has_one%E3%81%A8belongs_to%E3%81%AE%E9%81%95%E3%81%84</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
