In my application, I have a model `Comment` which has a relationship `author` with a model `User`. 

To speak in Java terms, this model `User` is an abstract class: the model instances are either of type `Student` or `Teacher`. To this end, the model `User` has an attribute `type`. So the structure is as follows:

```
App.Comment = DS.Model.extend({
    author: DS.belongsTo('user'),
    ...
});  

```

and

```
App.User = DS.Model.extend({
    type: DS.attr('string'),
    ...
});

App.Student = App.User.extend({
    ...
});

App.Teacher = App.User.extend({
    ...
});

```

Through a REST API I receive a list of `Comment`'s, including their respective `author`'s. 

By default, for each author, Ember will create an instance of the `User` model.

However, instead I would like it to create either a `Student` or a `Teacher`, depending on the `type` attribute in the request response.

What would be the best way to achieve this? Somewhere I should be able to override a function that maps JSON keys to Ember models.