You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Closing this issue. The comments made above are true. When using $select it does totally overwrite the attributes property. But, that makes sense because you would never really use both select and exclude at the same time.
As a note to future readers. If you need to use sequelize.attributes, do not also use query.$select.
Sequelize allows you to exclude attributes by providing an object to
attributes
instead of an array.See: https://sequelize.org/v5/manual/querying.html
But the following line overwrites
q.attributes
with thefilter.$select
feathers-sequelize/lib/index.js
Line 134 in dccc6a0
This means that even if the user passed the following object
The exclude will be totally overwritten with the
filter.$select
Instead the code should be updated to something like
NOTE: I have not actually tested this but stumbled across it while working on something. I will write a test to confirm and make a PR shortly
The text was updated successfully, but these errors were encountered: