Shopify/batman — pull request #577 by kristianpd (2012-10-30 14:21:36+00:00)
Title: Fix polymorphic associations

Fixes an issue with hasMany polymorphic association sets where adding additional associated objects to the loaded set would result with them ending up in any association set indices that shared the same `foreignKeyValue`.

Change was made to only add to polymorphic association set indices if new item types (`foreignTypeKeyValue`) also match.

@hornairs can you take a look?