title: Rails: undefined method `primary_key' for String:Class
body: <p>I have 3 classes, Schema, Entity and Property, representing the DB design business.
  The Schema-Entity seems work, but Entity-Property does not.</p>
  
  <pre><code>class Hx::Entity &lt; ActiveRecord::Base
    belongs_to :schema
    attr_accessible :name
    has_many :properties    ,  class_name: "Hx::Property"  , primary_key: "id"
  end
  
  class Hx::Property &lt; ActiveRecord::Base
    attr_accessible :destination, :indexed, :inverse, :isToMany, :kind, :name, :optional, :transient  , :type
  
  
    belongs_to :entity
  end
  </code></pre>
  
  <p>When I run entity_obj.properties, it throws the error <code>undefined method primary_key' for String:Class</code>.</p>
  
  <p>I twist around the has_many's options, but it does not help.</p>
  
  <p>Does anyone has any idea on this? </p>
  
  <p>Thanks.</p>