'projection': {'first_name': 1, 'created': 0} in the schema definition.
Thanks.
Nicola Iarocci
unread,
Nov 2, 2013, 7:05:40 AM11/2/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to pytho...@googlegroups.com
From the projection docs:
"Please note that key fields such as ID_FIELD, DATE_CREATED, DATE_UPDATED etc. will still be included with the payload."
This being said, if you really want your API do behave this way, you could still achieve that by stripping these fields out of the response payload. Just hook a callback to on_fetch_resource() hook. Since your callback will be called before the payload is returned to the client, you can use it to delete unwanted fields.
Nicola
Francisco Corrales Morales
unread,
Nov 3, 2013, 8:14:41 AM11/3/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
I mean, in Eve you can configure almost everything. Well, why not this one?
Thanks
wga...@gmail.com
unread,
Feb 12, 2019, 9:46:59 AM2/12/19
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Eve REST Framework
Is there any good reason why these fields are included? To me it feels like the designer of the API should be able to withhold things like the DATE_CREATED field.
Message has been deleted
nsher...@gmail.com
unread,
Feb 20, 2019, 10:32:52 AM2/20/19
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Eve REST Framework
I completely agree. Having the ability to exclude the _updated, _created etc. fields should be a default option.
Quick question about the callback workaround, would this impede performance at all?