I feel very frustrated for get model metadata. When I use metadataFor(modelName), I got a warning message, says
store.metadataFor()` has been deprecated. You can use `.get('meta')` on relationships and arrays returned from `store.query()`
and when the model change, the meta change to undefined
, so I use the store.query()
result to .get('meta')
, but I got nothing!!
This is the data return from server:
{
posts: [
{
id: 1,
topic: 'some topic'
},
{
id: 2,
topic: 'some topic'
},
{
id: 3,
topic: 'some topic'
},
],
meta: {
total: 10
}
}
Please help me !