Sending data to web api, child property is null


I asked earlier why would it be that my model’s properties are empty when sent to my api ( web api, and using the web-api adapter)

So I created a “test” model on both ends to test, a create route and submit my model. Actually it does work.

But when adding another class as property, it does not. So I’m guessing it’s either my naming conventions OR I did this custom component that render a select list wrong

apologies for posting tons of code, i just really dont know where to look no more .,…:frowning:

fyi, when i post and hit the breakpoint in my api (correct api call) the name property (string) is set, the TestType property is null)

My web api models:

public class TestModel
    public int Id { get; set; }
    public string Name { get; set; }
    public TestTypeModel TestType { get; set; }

public class TestTypeModel
    public int Id { get; set; }
    public string Name { get; set; }

My ember models (first “test.js”, then “testtype.js”)

export default Model.extend({
    name: attr('string'),
    testtype: belongsTo('testtype')

export default Model.extend({
    name: attr('string'),
    test: belongsTo('test')

My component (first “.js” then “.hbs”)

export default Ember.Component.extend({

tagName: 'select',
classNames: ['form-control'],
datatype: '',
items: [],
selectedId: 0,
store: Ember.inject.service(),

didReceiveAttrs : function(){
    this._super(...arguments);   'afterRender', this, this.afterRenderEvent);

afterRenderEvent : function(){
    var store = this.get('store'); 
    let items =  store.findAll(this.get('datatype'));
    this.set('items', items); {


{{#each items as |item|}}
    {{#if (eq selectedId}}
        <option selected="selected" value="{{}}">{{}}</option>
        <option  value="{{}}"> {{}} </option>

and finally in my “create.js” template (in templates/test/create.js)

{{select-component datatype='testtype' }}

I just purchased "Ember Data in the wild, hopefully will get o understand this myself, but would appreciate any pointers …