axkrishnan
Posts: 0
Joined: Tue Jul 29, 2014 12:14 am

Database projection fails when omitting "_id" field

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

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Database projection fails when omitting "_id" field

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.

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Database projection fails when omitting "_id" field

Hi axkrishnan,

Unfortunatly currently you can not exclude "_id" field.

Regards.

Return to “Issues”