Database projection with computed fields fails silently
I am trying to use MongoDB's projection feature to rename a field that I am returning from a query as described near the end of http://docs.mongodb.org/manual/refere...
In the example that is provided in that document, the field "copies" is renamed to "copiesSold" in the result.
I have created a test table with the default columns and a string column named "name". It can be seen in the attached screenshot.
When I use projection without the renaming feature, everything works as expected:
precurl -X GET -H "X-Appery-Database-Id: 54011bace4b055c018db1489" -G --data-urlencode 'proj={"name":1}' https://api.appery.io/rest/1/db/collections/projectme
Response: [{"_id":"54011bd9e4b055c018db148d","name":"hello"}]/pre
However, if I try to rename the column the projection fails silently and omits the requested column, but still returns the "_id" column.
precurl -X GET -H "X-Appery-Database-Id: 54011bace4b055c018db1489" -G --data-urlencode 'proj={"new_name":"$name"}' https://api.appery.io/rest/1/db/collections/projectme
Response: [{"_id":"54011bd9e4b055c018db148d"}]/pre
Eventually I would like to do more than just rename columns, but actually use the dot notation to access members of an embedded document, but for the test case I am simply using the feature to rename a field.