Shopify/batman — comment on commit 1e8cf583d69489822f78014e4eeed0dbdcf39985
File:  line 0
By hornairs:

To me it didn't make sense to have them in a global pool and loop through them all each time a model was encoded or decoded. It means that model A has to pay a performance penalty as model B's associations grow, and it duplicates functionality we have already in _Batman. I'd rather keep associations in the same place we keep accessors and all other inheritable behaviour.

We could still support a dynamic ancestor traversal when looking for associations, but I don't see the use case. You want your models to have the accessors and encoders for their associations defined so that you can use them for the initial data load. You can dynamically add them before the first save based on some state or remote data, but after this point I just don't think it will be done.