emberjs/data — pull request #895 by ghempton (2013-04-17 06:12:25+00:00)
Title: Simplify Transaction Implementation

Currently, model states are tracked twice: once on the model and once in the transaction "buckets". This results in un-necessary coupling between the model and it's transaction and adds a lot of complexity to the implementation. This PR simplifies things by calculating the commit details based on model state.

@wycats worried this would result in worse performance, however I don't believe that to be the case, as we already iterate over all records during commit (not to mention the number of models in a transaction is low-cardinality).

I expect this to make things simpler down the line, e.g. #539. It should also be noted that this makes transactions a little more flexible by allowing mutated records to be moved to a different transaction. I think this is the correct move, especially when you want to split up the default transaction.