store.find('model-type', { prop: value} ) no longer working in 0.5.4
Closed this issue · 6 comments
Since 0.5.4 i can no longer recover models using find or findQuery.
I think i found the problem.
DS.hasMany('model')
relationships are failing because of this line change in the last commit.
- var foreignAdapter = type.store.adapterFor(relationModel);
+ var foreignAdapter = store.adapterFor(relationName);
The new line throws this error "No model was found for 'modelPropName'"
because its attempting to pass in the relationship property name and not the model type the prop represents.
type.store.adapterFor(relationModel);
does not throw any deprecations so why was it switched out?
FYI store.adapterFor(relationModel)
also works without exploding.
I may be experiencing a related bug. After upgrading to 0.5.4
, I get an error when retrieving a record with store.find(modelName, id)
, resulting in the following error:
Error while processing route: No model was found for
coApplicants
Where coApplicants
is a hasMany
relationship on a given model (not async
)
What versions of Ember Data are you using?
1.18 beta
This is affecting my solution as well - I thought it had to do with pluralization, but no