我无法查询我的模型。我不知道我做错了什么。
我的商店定义为
App.Store = DS.Store.extend({
revision: 12,
adapter: DS.FixtureAdapter
});
我的模型定义了,
var Feature = DS.Model.extend({
name: DS.attr('string'),
description: DS.attr('string'),
parent: DS.belongsTo('SimpleTestManager.Feature'),
DS.belongsTo('SimpleTestManager.Project'),
children: DS.hasMany('SimpleTestManager.Feature'),
requirements: DS.attr('string')
});
App.Feature.adapter = DS.FixtureAdapter.create();
App.Feature.FIXTURES = [
{
id: 1,
name: "my first feature",
description: "some description",
parent: null,
project: 1,
children:[2],
requirements: "This is my first feature. It has many requirements."
},
{
id: 2,
name: "a sub feature",
description: "some sub feature.",
parent: 1,
project: 1,
children:[],
requirements: "This is a sub feature."
}
];
当我在命令行中运行以下
>>App.Features.find({id:'1'})
Error: assertion failed: Not implemented: You must override the DS.FixtureAdapter::queryFixtures method to support querying the fixture store.