Open cedv opened 7 years ago
I believe you need to use syncWithMeta
@amwmedia, I believe he means that he couldn't retrieve the meta information in the store
object after doing store.syncWithMeta(payload)
. I'm kinda having the same problem to retrieve the meta object after syncing it in the store. Is there something like store.metadata()
to retrieve this information from the store
?
@cedv @italopaiva As you can see here, the syncWithMeta
method will return an object containing the meta data. So you should do:
var res = store.syncWithMeta(payload);
console.log(res.meta);
I agree the README is not clear on that point. Would any of you guys mind opening a docs PR?
Support for meta object doesn't seem to work.
I tried with both
store.sync
andstore.syncWithMeta
, and either way, I can't see the meta information in the datastore when I pull the record usingstore.find
. The rest of the data is fine; I can see the attributes, relationships and links.This is how I use the datastore (within some AngularJS code):
And this is my JSON payload: