I have a very basic nested route set up that was working prior to the new release with a fixture adapter. this.resource(‘parent’, {path: ‘/parent/:parent_id’}, function(){ this.resource(‘child’, function(){ this.route(‘nestedChild’);
The parent model has several hasMany relationships which I attempt to render into the template of the nested child.
I have a transitionTo(nestedChild, parentModel) which because of the route hiearchy has the argument passed to the parentRoute object first, where I set it in the setUpController hook.
App.ParentRoute setupController: function(controller, model){ controller.set(‘model’, model); }
then in the nestedChild route I set the model by using controllerFor
App.NestedChildRoute setupController: function(controller, model){ controller.set(‘model’, this.controllerFor(‘member’).get(‘model’)); }
When I transition using the transitionTo I get the following error message,
Assertion failed: You looked up the ‘CheckingAccounts’ relationship on ‘Www.Member:ember317:1’ but some of the associated records were not loaded. Either make sure they are all loaded together with the parent record, or specify that the relationship is async (DS.attr({ async: true })
) components.js:9587
Uncaught TypeError: Cannot read property ‘resolve’ of undefined
I tried making the hasMany’s asynch as suggested but the behaviour becomes unpredictable where sometimes the view renders perfectly and others it errors out and only renders upon refresh.
How can I “make sure they are all loaded together with the parent record” to solve this issue, or is this even the right approach?