Shopify/batman — pull request #328 by hornairs (2012-02-10 18:27:21+00:00)
Title: Polymorphic associations

Implements polymorphism via a second foreignKey on the belonging-to model defaulting to `#{label}_type`, same as rails. Polymorphism is engaged same as Rails as well with `@belongsTo 'subject', {polymorphic: true}` on the child model and `@hasMany 'children', {as: 'subject'}` on the parent.

@nciagra @ktusznio for review please.