title: data_mapper, attr_accessor, & serialization only serializing properties not attr_accessor attributes
body: <p>I'm using data_mapper/sinatra and trying to create some attributes with attr_accessor.  The following example code:</p>
  
  <pre><code>require 'json'
  class Person
    include DataMapper::Resource
  
    property :id,          Serial
    property :first_name,  String
    attr_accessor  :last_name
  end
  
  ps = Person.new
  ps.first_name = "Mike"
  ps.last_name = "Smith"
  p ps.to_json
  </code></pre>
  
  <p>produces this output:</p>
  
  <pre><code>"{\"id\":null,\"first_name\":\"Mike\"}"
  </code></pre>
  
  <p>Obviously I would like for it to give me both the first and last name attributes.  Any ideas on how to get this to work in the way one would expect so that my json has all of the attributes?  </p>
  
  <p>Also, feel free to also explain why my expectation (that I'd get all of the attributes) is incorrect.  I'm guessing some internal list of attributes isn't getting the attr_accessor instance variables added to it or something.  But even so, why?</p>