emberjs/data — pull request #826 by everwakeful (2013-03-21 00:35:56+00:00)
Title: Clear relationship errors on invalid records when relationships are updated

When a record is made invalid by the adapter the errors object is set on the model, with the model attributes that are in error. Once the attributes in error are corrected, they are removed from the errors object.

However this is not the case for attributes that represent a relationship. Once these attributes are set in the error object, updating them will not remove them.

I provided an example with this ticket (https://github.com/emberjs/data/issues/764) but fear that my explanation of the issue was not clear.

My proposed solution is to alter the `invalid` state, moving the error clearing from `didSetProperty` to `becomeDirty`, which is called by both relationship and attribute changes and thereby clearing attributes from the error object when a change occurs.