Page 1 of 1

Database projection fails when omitting "_id" field

Posted: Sat Aug 30, 2014 1:11 am
by axkrishnan

I have the following test table:
Image

I am trying to use the projection feature to exclude the "_id" field from the results like so:

precurl -X GET -H "X-Appery-Database-Id: 54011bace4b055c018db1489" -G --data-urlencode 'proj={"_id":0}' https://api.appery.io/rest/1/db/collections/projectme/pre

But I get the error: {"code":"DBSQ000","description":"This wasn't supposed to happen but an error occurred. Please try again. If the error persists please let us know on the http://appery.io/forum or email us: a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a"}

Omitting the "name" field does not cause an error and works as expected:
precurl -X GET -H "X-Appery-Database-Id: 54011bace4b055c018db1489" -G --data-urlencode 'proj={"name":0}' https://api.appery.io/rest/1/db/collections/projectme

Response: [{"id":"54011bd9e4b055c018db148d","createdAt":"2014-08-30 00:33:29.704","_updatedAt":"2014-08-30 00:33:29.704"}]/pre


Database projection fails when omitting "_id" field

Posted: Sat Aug 30, 2014 2:46 pm
by Illya Stepanov

Hi -

Thanks for pointing on this issue, we'll investigate this case and we'll let you know when have more information from developers team.


Database projection fails when omitting "_id" field

Posted: Sun Aug 31, 2014 9:04 pm
by Yurii Orishchuk

Hi axkrishnan,

Unfortunatly currently you can not exclude "_id" field.

Regards.