var User = DS.Model.extend({ messages: DS.hasMany('message', {polymorphic: true}) }); var Message = DS.Model.extend({ user: DS.belongsTo('user'), body: DS.attr() }); var Post = Message.extend({ comments: DS.hasMany('comment'), title: DS.attr() }); var Comment = Message.extend({ post: DS.belongsTo('post') }); User.FIXTURES = [{ id: 1, messages: [{ id: 1, type: 'post' }, { id: 2, type: 'comment' }] }] Post.FIXTURES = [{ id: 1, title: 'My first post', body: 'This is interesting', user: 1 }]; Comment.FIXTURES = [{ id: 2, body: 'I forgot to add something' }];