emberjs/data — pull request #490 by pivotal-medici (2012-11-27 15:09:13+00:00)
Title: Clear relationships before dematerializing

The relationship change object needs to look up the record type in the
store (so it can find and unset inverse associations). Dematerialization
needs to occur after that happens, as it removes it from the store's type
lookup table.