emberjs/data — Issue #69: DS.attr transform for Objects
Author: pixelcort
Created: 2012-01-31 21:27:22+00:00
State: open

Currently there appear to be four attribute transforms: boolean, date, integer (which is actually number) and string. In addition, I'd like the ability to define DS.attr('object').

I have JSON like the following:

{
class: 'Car',
id: 1,
info: {
make: 'Nissan',
model: 'Altima'
}
}

I'd like to do something like the following:

App.Car = DS.Model.extend({
info: DS.attr('object')
});

var car = App.store.find(App.Car, 1);
var make = car.get('info').make;