title: Belongs_to relationship not behaving as expected
body: <p>I have the following two objects: </p>
  
  <pre><code>class Layout &lt; ActiveRecord::Base
  
    has_many :content_panels, foreign_key: :layout_uuid, primary_key: :uuid
    . . .
  end
  </code></pre>
  
  <p>and</p>
  
  <pre><code>class ContentPanel &lt; ActiveRecord::Base
  
      belongs_to :layout, foreign_key: :layout_uuid, primary_key: :uuid
      . . .
  end
  </code></pre>
  
  <p>If I do the following:</p>
  
  <pre><code>layout = Layout.create
  =&gt; #&lt;Layout id: 42, uuid: nil&gt;
  </code></pre>
  
  <p>I expect the following to work</p>
  
  <pre><code>content_panel = layout.content_panels.create
  =&gt; #&lt;ContentPanel id: 31, layout_id: nil, layout_uuid: nil, uuid: nil&gt;
  </code></pre>
  
  <p>. . .  and it does, except when I call:</p>
  
  <pre><code>content_panel.layout 
  =&gt; nil
  </code></pre>
  
  <p>I get <code>nil</code>, always.  <em>I should be getting the <code>layout</code> object I created it with?</em></p>
  
  <p>But if I call:</p>
  
  <pre><code>layout.content_panels
  =&gt; #&lt;ActiveRecord::Associations::CollectionProxy [#&lt;ContentPanel id: 31, layout_id: nil, layout_uuid: nil, uuid: nil&gt;]&gt;
  </code></pre>
  
  <p>I get a list of objects that contains the <code>content_panel</code> I created above.</p>
  
  <p>What makes my <code>content_panel.layout</code> value always equal nil and not the object it belongs to?</p>