PaulUithol/Backbone-relational — pull request #275 by justmatt (2013-02-21 22:33:58+00:00)
Title: support for dotNotation setter and options w/ tests

Code to fix #274

Allows nested or related model attributes to be set with dot-notation i.e
```javascript
test("'dotNotation' enabled", function(){
var NewUser = Backbone.RelationalModel.extend({});
var NewPerson = Backbone.RelationalModel.extend({
dotNotation: true,
relations: [{
type: Backbone.HasOne,
key: 'user',
relatedModel: NewUser
}]
});
var person = new NewPerson({
"normal": true,
"user.over": 2,
user: {name: "John", "over" : 1}
});

person.set( 'normal', false );
ok( person.get( 'normal' ) === false, "setting normal attributes works as usual" );

person.set( 'user.name', 'Mike' );
ok( person.get('user').get('name') === "Mike", "attributes of nested models can be set via dot notation: nested.attribute");
ok( person.get('user.name') === "Mike", "attributes of nested models can be get via dot notation: nested.attribute");
});

```
This is my first contribution to an open-source project, and I think the code could be written better by somebody with more experience; any feedback much appreciated.