Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

limit embedded array with subscription manager #91

Open
Vercryger opened this issue Mar 3, 2017 · 0 comments
Open

limit embedded array with subscription manager #91

Vercryger opened this issue Mar 3, 2017 · 0 comments

Comments

@Vercryger
Copy link

I am trying to understand why submanager does not update the fetched documents when I change the limit of and embedded array inside a collection, no matter how big this limit is, sub-manager does not bring me all of those elements, but it updates the subscription.
So for example, I have Todos collection defined like this:

{
  title: 'Something to do',
  subtitle: 'Remember this',
  subtasks: [
    {title: 'Subtask 1'},
    {title: 'Subtask 2'},
    {title: 'Subtask 3'},
    {title: 'Subtask 4'}
  ]
}

and the following routes:

(1) /todo/:_id
// subscribe to task title and subtitle

(2) /todo/:_id/details
// subscribe to task title, subtitle and the first 10 subtasks 

Both routes are subscribed to the same publication handled by subscription manager, so if I go to 2 from 1, subscription manager will update the publication, but the client will not show these subtasks until I manually refresh the browser which obviously I don't want my app to do that, and even this way, using the loadMore path, will not fetch new embedded documents.

If I don't use subscription manager, this works as expected. What am I missing?

p.s.: I build a todo example to reproduce this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant