Notes from my upgrade to the DataMapper next branch (as of today)

  • Assiciation class names are now specified as :model => "User"

      belongs_to :owner, :class_name => "User", :child_key => [:owner_id]
    
  • Belongs to associations have a :nullable => false by default, so you gotta do :nullable => true if you want that sort of thing

  • #relationships on a Resource instance is now private, so you gotta do instance.model.relationships
  • Do author.books.new instead of author.books.build (which makes more sense anyway)
  • Has many through has changed and is better explained by example:

      has n, :subscribers, :through => :subscriptions, :model => 'User', :via => :user
      # :via => :user tells it to use the association named user
    
  • new? and not new_record?

  • original_attributes and not original_values
  • database.yml has changed a bit:

      adapter: mysql
      path: db_name
      host: localhost
      user: root