Shopify/batman — pull request #626 by hornairs (2012-12-18 20:33:11+00:00)
Title: Pre-instance identity mapping in hasMany decoder

@nciagra @kristianpd @mattwdh

This is a bandaid over the `HasManyAssociation._setsByRecord` model leak caused by the `HasManyAssociation` decoder. Instead of making a bunch of new records to figure out IDs and use those to then properly pull records out of the identity map, this drops the functionality to allow for simple ID calculation from the JSON and no ephemeral instances (at least none from here) that hit the leak problem.

Maybe I am missing something but after playing with the `map_identity_pair` I came up with a seemingly simpler solution which works all nice like.

Please discuss!