Ember CLI with polymorphic embedded : always


#1

Hi Team, I am trying to create the ember data model with polymorphic relationship, i am able to load the data for extended model when i use async, when i try embedded its not loading the data into corresponding model, code is displayed below see that and give some response what went wrong here, thanks in advance.

Main Model : export default DS.Model.extend({ name : DS.attr(), perception: DS.belongsTo(‘perception’,{polymorphic: true, async: true}) });

Perception Model : export default DS.Model.extend({ });

Extended Model : import perception from ‘./perception’; import DS from ‘ember-data’;

export default perception.extend({ plotOptions: DS.attr() });

Response Getting From Server {main: { id: 1, name: “High Bar Montage”,
perception: { id: 2,
type: “highbar” } },extended : { id: 2, plotOptions: “i belong to highbar” } }