PaulUithol/Backbone-relational — Issue #84: Nested relationships broken when using KeySource
Author: jeffutter
Created: 2012-02-29 21:26:50+00:00
State: open

It seems that using KeySource somehow breaks calling fetchRelated on a model that is already related to another model

collection.get(1).fetchRealted('models').get(1).fetchRelated('more_models') returns undefined

I made up two jsFiddles one with KeySource that is broken and one without KeySource that is not. It seems that internally in the fetchRelated function on the nested model rel = this.getRelation( key ) returns undefined.

Here are my two examples:

Broken with KeySource: http://jsfiddle.net/jeffutter/mbHhL/

Working without KeySource: http://jsfiddle.net/jeffutter/Rb3zW/