Create Record error when switching routes


I’m getting the following error when trying to create a record from switching routes

Error: Assertion Failed: You may not pass `null` as id to the store's find method

The problem is in assigning a model to a parent belongs_to association in

var newSchool ='deal', {
          name: newScholName,
          parent: this.get(''),

it works from entering the route freashly but throws the assertion when navigating between routes. The parent model is also of the same type and has a null parent value.

If the parent value is left out of createRecord it works regardless


The problem is that this.get(“”) is returning null. Are you passing anything to the new route? I wonder if the following, from the manual, has any bearing on this.

If the new route has dynamic segments, you need to pass either
a model or an identifier for each segment. Passing a model will
skip that segment's model hook. Passing an identifier will run
the model hook and you'll be able to access the identifier in the
params. See Links for more detail.


Yeah, but if I log‘’) before the createRecord it logs the model but it still throws the assertion. Also if this is relevent, it sets all the propetires in the store before parent but after it they are null.