feathersjs / feathers

The API and real-time application framework
https://feathersjs.com
MIT License
15.07k stars 751 forks source link

$select=['id'] in query returns an array of ID's #3065

Closed samb271 closed 1 year ago

samb271 commented 1 year ago

I'm receiving an array of 2 IDs when using $select argument in my query object.

Steps to reproduce

URL: http://localhost:3003/submissions?$select[]=id&$select[]=title

Expected behavior

{ "total": 1, "limit": 10, "skip": 0, "data": [{ "id": 1, "title": "First submission" }] }

Actual behavior

This is the response: { "total": 1, "limit": 10, "skip": 0, "data": [{ "id": [ 1, 1 ], "title": "First submission" }] }

System configuration

I'm using MSSQL and Knex.

Module versions (especially the part that's not working): feathers 5.0.0-pre.35

NodeJS version: v18.13.0

Operating System: macOS Ventura 13.2