-
Notifications
You must be signed in to change notification settings - Fork 28
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
ReactiveAggregate with angular-meteor #12
Comments
@jbx-alex : Disclaimer: I've never used Angular. Having said that, I notice you're using the same collection reference ( I would suggest you check and eliminate that possibility by using a guaranteed client-only collection for the aggregation results (the README shows an example of doing that). If you are still having problems, please provide a minimal reproduction that I can test. Thanks 🙂 |
Hello @robfallows, I have created a new collection for the client and so if it has worked for me. validations.publisher.ts
validations-list.component.ts
But now I have another problem, and that is when I try to paginate this listing:
The first page returns data, but if I click on any other it returns empty Thanks in advance. |
Hello @robfallows, Sorry for writing so many messages when the error is not from your library. I have solved the pagination, it seems that it was the order of the parameters:
but now I get a console error when I delete an observable item from the list in the client, that is, the validations have a status and there are different lists according to their status, if the validation changes state I get an error when disappearing from that list.
Thanks in advance. |
@jbx-alex : Are you using string |
I do not understand what you want to say to me with ObjectIds, _id we do not use it, we create our own id that they share in the same value, in the mongo collection if there is the _id of the table validations collections: _id: 5 |
Please provide a minimal reproduction in a GitHub repo I can clone and test. |
Hello @robfallows, I have created a repository so you can test, but I could not replicate the error: Our project does not use string _ids or ObjectIds We add documents from our API, which is built in symfony, with int ids. I do not know if you know how we can solve this, since we can not change our collections to use string _ids or ObjectIds. Thank you so much. |
@jbx-alex : thanks for the repro. I'm struggling to build this, as it's eating all my CPU. I think int However, if you cannot replicate the error with your repro, the issue may be elsewhere in your code. I will close this issue for now. If you find you can reproduce the error, please feedback and I'll re-open it. |
@robfallows Perfect, I will try to insert in mongo int Thanks in advance. |
Hello @robfallows, I have reproduced your code in my project to debug and I found the problem.
the conse.logs that I have added show this by console: console.log(docs);
console.log(doc._id);
console.log(sub);
here The only thing that has occurred to me is to force it to convert it to string in this way: I do not know if you have a better solution. |
Please, can you tell me something about the issue |
@jbx-alex : Meteor adds the const x = { x:1, c:2, a:3 }
console.log(x) # {x: 1, c: 2, a: 3}
const y = { x:1, c:2, a:3, 11:11, "99": 99 }
console.log(y) # {11: 11, 99: 99, x: 1, c: 2, a: 3} Adding a non-numeric character to anything looking like a number forces JavaScript to preserve the order of keys by preserving the Short answer: you can't do what you want to do by using integers for Longer answer: if you want to forego pub/sub and reactive aggregations, you can call a Meteor method to do a non-reactive aggregation and return the results as an array of documents. Those can have any |
hello @robfallows, Thanks, finally I have changed the way in setting the _id from the API to be a ObjectId since there is not a good solution from Meteor. |
hello,
Is it possible to use this library with angular-meteor?
I have this code:
validations.publisher.ts
validations-list.component.ts
I do not have any error in terminal or in client, but MiniMongo does not subscribe to any data in Validations.
I have tested the query in RoboMongo and it returns the data well.
Thanks in advance.
Regards
The text was updated successfully, but these errors were encountered: