<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>mather314</author_name>
  <author_url>https://blog.hatena.ne.jp/mather314/</author_url>
  <blog_title>My Brain is Open.</blog_title>
  <blog_url>https://mather.hatenablog.jp/</blog_url>
  <categories>
    <anon>Mongoid</anon>
    <anon>Rails</anon>
  </categories>
  <description>MongoDBの（埋め込みでない）参照を用いる references_one の挙動について。 class Person include Mongoid::Document field :name references_one :car end class Car include Mongoid::Document field :name referenced_in :person end モデルがこうなっているときに、次のような車の取り合いをやってみますｗ p1 = Person.new(:name =&gt; &quot;hoge&quot;) # =&gt; BSON::ObjectId('...000001') p2…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmather.hatenablog.jp%2Fentry%2F20101221%2F1292901637&quot; title=&quot;references_oneの挙動 - My Brain is Open.&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>2010-12-21 12:20:37</published>
  <title>references_oneの挙動</title>
  <type>rich</type>
  <url>https://mather.hatenablog.jp/entry/20101221/1292901637</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
