title: Unknown primary key for table in model
body: <p>I am getting unknown primary key for table, I am not able to judge why this is coming
  My Table has primary key </p>
  
  <p>CustomerNote</p>
  
  <pre><code># == Schema Information
  #
  # Table name: customer_notes
  #
  #  id                       :integer          not null, primary key
  #  title                    :string
  #  company_id               :integer
  #  customer_id              :integer          not null
  #  user_id                  :integer
  
  Customer Note Version
  # == Schema Information
  #
  # Table name: customer_note_versions
  #
  #  id                       :integer          not null, primary key
  #  title                    :string
  #  user_id                  :integer
  #  company_id               :integer
  #  customer_note_id         :integer
  #
  #Foreign Keys
  # fk_rails_...  (customer_note_id =&gt; customer_notes.id)
  </code></pre>
  
  <p>CustomerNoteVersion</p>
  
  <pre><code>belongs_to :customer_note
  validates :title, :user_id, :customer_note_id, presence: true
  </code></pre>
  
  <p>CustomerNote</p>
  
  <pre><code>has_many :customer_note_versions, dependent: :destroy
  validates :title, presence: true
  </code></pre>
  
  <p>I am trying to call 
  CustomerNote.new.customer_note_versions
  Its throwing error on test console</p>
  
  <blockquote>
    <p>ActiveRecord::UnknownPrimaryKey: Unknown primary key for table
    customer_notes in model CustomerNote.</p>
  </blockquote>