via (why not ben)
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.newinstead ofauthor.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 usernew?and notnew_record?-
original_attributesand notoriginal_values database.yml has changed a bit:
adapter: mysql path: db_name host: localhost user: root