title: ActiveRecord belongs_to association returns nil
body: <p>I have a model <code>Spree::Quotation</code> as follows</p>
  
  <pre><code>class Spree::Quotation &lt; ActiveRecord::Base
  
    has_one :payment_term, -&gt; { where(service_type: 'Spree::Quotation') },
            class_name: 'PaymentTerm',
            foreign_key: 'service_id'
  end
  </code></pre>
  
  <p>This is the <code>PaymentTerm</code> model</p>
  
  <pre><code>class PaymentTerm &lt; ActiveRecord::Base
  
    belongs_to :quotation, -&gt; { where(service_type: 'Spree::Quotation') },
               class_name: 'Spree::Quotation',
               primary_key: 'service_id'
  end
  </code></pre>
  
  <p>this is the contents of <code>payment_terms</code> table</p>
  
  <pre><code>development=# SELECT "payment_terms".* FROM "payment_terms";
  
   id | service_id |   service_type   |     term     | 
  ----+------------+------------------+--------------+
    1 |          1 | Spree::Quotation | 100% upfront |
  (1 row)
  </code></pre>
  
  <p>now when I do <code>Spree::Quotation.first.payment_term</code> I am getting the payment_term correctly</p>
  
  <pre><code>2.1.8 :007 &gt; Spree::Quotation.first.payment_term
    Spree::Quotation Load (1.0ms)  SELECT "spree_quotations".* FROM "spree_quotations" ORDER BY "spree_quotations"."id" ASC LIMIT 1
    PaymentTerm Load (0.7ms)  SELECT "payment_terms".* FROM "payment_terms" WHERE "payment_terms"."service_id" = $1 AND "payment_terms"."service_type" = 'Spree::Quotation' LIMIT 1  [["service_id", 1]]
   =&gt; #&lt;PaymentTerm id: 1, service_id: 1, service_type: "Spree::Quotation", term: "100% upfront",... &gt;
  </code></pre>
  
  <p>But when I do <code>PaymentTerm.first.quotation</code>, I am getting <code>nil</code></p>
  
  <pre><code>2.1.8 :008 &gt; PaymentTerm.first.quotation
    PaymentTerm Load (0.8ms)  SELECT "payment_terms".* FROM "payment_terms" ORDER BY "payment_terms"."id" ASC LIMIT 1
   =&gt; nil
  </code></pre>
  
  <p>Why is it not loading the quotation? Thanks in advance</p>