Reactivity issue: Linked data is not always up to date
See original GitHub issueHi!
I have an invoice collection and a lineitem collection which is linked with the invoice.
When I do operations in a single server method that changes data in the invoice AND in the line items (like removing a lineitem which changes the invoice sum on the invoice and manipulating the order fields on every lineitem), sometimes the latest changes within the linked collection are not reflected on the client.
@theodorDiaconu Means the data in the mongodb is correct, but I didn’t get the latest change from the linked collection.
My code:
(invoiceCollection as any).addLinks({
customer: {
type: 'one',
collection: customerCollection,
field: 'customerId',
denormalize: {
field: 'customerCache',
body: {
name: 1,
name2: 1
}
}
},
template: {
type: 'one',
collection: invoiceTemplateCollection,
field: 'templateId'
},
invoiceElements: {
collection: invoiceElementCollection,
inversedBy: 'invoice'
},
invoiceLineItems: {
collection: invoiceLineItemCollection,
inversedBy: 'invoice'
}
});
(invoiceLineItemCollection as any).addLinks({
invoice: {
type: 'one',
collection: invoiceCollection,
field: 'invoiceId'
}
});
Thanks!
Issue Analytics
- State:
- Created 5 years ago
- Comments:13 (6 by maintainers)
Top Results From Across the Web
Reactivity on Variables Not Associated With Data, Computed ...
Any data that is not reactive will not be tracked. Updating that data will not cause a re-render, won't update computed properties and...
Read more >Common problems with reactivity · Issue #849 · vuejs/docs
This is an umbrella issue, intended to gather examples of common problems, mistakes and misunderstandings when using the proxy-based ...
Read more >Linked Data - Design Issues - W3C
Linked Data. The Semantic Web isn't just about putting data on the web. It is about making links, so that a person or...
Read more >Why Your Vue Component Isn't Updating (and how to fix it)
Here are some links if you want to jump right in: Check that variables are reactive; Make sure to update Arrays and Objects...
Read more >Reactivity Fundamentals - Vue.js
These instance properties are only added when the instance is first created, so you need to ensure they are all present in the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you very much @hoebbelsB . I will be looking at this Wednesday.
@theodorDiaconu Sorry, I quit meteor in the meantime and wrote my own AsyncIterator for GraphQL Subscriptions (using Mongo ChangeStreams) to get rid of the limitations.