question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

subscribing to query with $populate does not see any updates even with listStrategy=always

See original GitHub issue

Steps to reproduce

e.g.

.find({query: {
   $populate: [
      {path: 'pets'}
   ]
}})
.subscribe(...

Service with listStrategy=always

If I comment out the

Expected behavior

whenever a new document is added (via api), the subscribed query should fire with the updated results.

Actual behavior

Nothing happens. the subscribe does not fire with the updated query.

Deleting a document works fine.

System configuration

Tell us about the applicable parts of your setup.

Module versions (especially the part that’s not working):

feathers-2.1.2
feathers-reactive-0.4.1
feathers-mongoose-5.1.0
feathers-socketio-2.0.0

NodeJS version: v6.10.2

Operating System: ubuntu 16.04.2 LTS

Browser Version: Chrome-58.0.3029.96 (64-bit)

React Native Version: rxjs-5.4.0 Module Loader: Webpack-2.5.1

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

5reactions
dafflcommented, Sep 12, 2017

No. It means that $populate is interpreted as a query parameter and not as a special parameter. I should have a fix for this shortly.

0reactions
jskrzypekcommented, Nov 22, 2017

@baljeet @ngamulin You can see my issue #82 for an example of how we solved this without a lot of extra code.

Read more comments on GitHub >

github_iconTop Results From Across the Web

mongoose find, populate, sort is not sorting - Stack Overflow
I'm starting to wonder if it's possible to tell mongoose to chain sort semantics post-population and specify an embedded field in the query....
Read more >
Mongoose v6.8.2: Query Population
Just call the populate method on the query and an array of documents will be ... the below query won't return any results,...
Read more >
populate match not working · Issue #1548 - GitHub
What is wrong about my code? Tried to filter using match in populate but only getting null for b_id: my code is as...
Read more >
How to use Populate in Mongoose & Node.js
Hi Neural. I don't think, we can find or filter items based on populated items. It may also slow down the query as...
Read more >
Mistakes You're Probably Making With MongooseJS, And ...
This is a guest post from Valeri Karpov, a MongoDB Hacker and co-founder of the Ascot Project. For more MEAN Stack wisdom, check...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found