Comments (7)
starting from mongodb 3.4, it use .project() for selecting fields
from feathers-mongodb.
After I changed the codes to
if (filters.$select) {
q = this.Model.find(query).project(this._getSelect(filters.$select));
}
thanks to @Pogix3m now finally works on my project without a problem. Some of the unit test associated with $select breaks for this module.
from feathers-mongodb.
Are you sure you are not changing the query somehow in a hook? This is being tested in https://github.com/feathersjs-ecosystem/feathers-service-tests/blob/master/src/common-tests.js#L229 and I just double checked that it still works with latest master.
from feathers-mongodb.
I cloned this repo then made some test and they all work just fine with mongodb v3.6.2 . I tried using $select query to three different services of my project without any modification to query object of params but they give the same result of returning all the fields. Other query like $limit and $sort has no problem.
from feathers-mongodb.
If the build is still passing I'd be happy to accept a pull request with that change.
from feathers-mongodb.
Seems like fixes for this issue has been made but not included to the latest module. Though I just eliminated the recreation of a new cursor object.
from feathers-mongodb.
Closed via #111
from feathers-mongodb.
Related Issues (20)
- RegExp in $in inside query does not get passed to server properly. HOT 2
- An in-range update of @feathersjs/adapter-commons is breaking the build 🚨 HOT 1
- An in-range update of dtslint is breaking the build 🚨 HOT 1
- An in-range update of @types/mongodb is breaking the build 🚨 HOT 3
- Aggregation pipeline for patch HOT 2
- $near query with pagination HOT 1
- Support for bulkWrite HOT 8
- Await setting the model before continuing HOT 3
- $geoNear, $near, and $nearSphere are not allowed in this context
- Regex not working HOT 1
- _objectifyId does not objectify id's nested in query objects
- Multi-tenancy support? HOT 1
- Error when upgrade package mongodb to 4.0.1 HOT 3
- Why this query is not using the index? ( keysExamined: 0 docsExamined: 27417057 ) HOT 3
- Compatibility with mongo driver V4
- ECONNREFUSED when db container is moved/recreated to a new node
- upsert does not create new record HOT 1
- $push not working as expected HOT 1
- Multi create/patch/remove performance HOT 1
- Not working find query with complex query on the _id field (ObjectId conversion) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from feathers-mongodb.