Reputation: 540
Learning ember and tryign to figure out why this doesn't work....
I have a model like this:
import DS from 'ember-data';
var Class = DS.Model.extend({
theclassname: DS.attr('string'),
users: DS.hasMany('user', {async: true})
});
Class.reopenClass ({
FIXTURES : [
{
id:1,
theclassname: "first",
users: [1,2,3,4,5,6,7,8]
},
{
id:2,
theclassname: "second",
users: [1,2,3,4,5,6,7,8]
}
]
});
export default Class;
In my route I can get back a model when I have it like this:
import Ember from 'ember';
var HomepageRoute = Ember.Route.extend({
model: function(){
return this.store.find('class');
}
});
export default HomepageRoute;
But when I do this to pick a single item I get errors and no data:
import Ember from 'ember';
var HomepageRoute = Ember.Route.extend({
model: function(){
return this.store.find('class', { theclassname: "first"} );
}
});
export default HomepageRoute;
I'm trying to use the examples in the guides.. and that to me looks like what was in the guides... but it doesn't work... I'm probably missing something important...
Thanks Vida.
Upvotes: 0
Views: 91
Reputation: 540
Ok,
So having googled around about the error:
Assertion Failed: Not implemented: You must override the DS.FixtureAdapter::queryFixtures method to support querying the fixture store. Error: Assertion Failed: Not implemented: You must override the DS.FixtureAdapter::queryFixtures method to support querying the fixture store.
I find that my question is already answered here: findQuery() is not working in ember-data?
Basically the Fixture adapter doesn't support searching out of the box.. which is a bit tough on people like me who are trying to learn ember...
Upvotes: 1