title: DataMapper - why "has" and "belongs_to"?
body: <p>I'm just getting started with DataMapper and I'm trying to figure out why you need to specify a <code>has</code> and a <code>belongs_to</code>.</p>
  
  <p>For instance, look at the example on the DataMapper website.  Isn't this redundant?  If Post <code>has n</code> comments, then doesn't Comment automatically <code>belongs_to</code> post?  Why do I have to specify this?</p>
  
  <pre><code>class Post
    include DataMapper::Resource
  
    property :id, Serial
  
    has n, :comments
  end
  
  class Comment
    include DataMapper::Resource
  
    property :id,     Serial
    property :rating, Integer
  
    belongs_to :post  # defaults to :required =&gt; true
  
    def self.popular
      all(:rating.gt =&gt; 3)
    end
  end
  </code></pre>