Adding Computed fields to API
jimohalloran opened this issue · 0 comments
jimohalloran commented
The documentation for adding a computed field to the API (https://doc.oroinc.com/backend/api/how-to/#add-a-computed-field) seems to be lacking in one important detail. If you follow the instructions as written you can no longer update the entity via the API as the computed field isn't mapped by the form type class. The solution (supplied by @vsoroka in Slack - https://orocommunity.slack.com/archives/C11NBUUGY/p1604973667120900?thread_ts=1604971873.120700&cid=C11NBUUGY ) is to add the following to api.yml:
form_options:
mapped: false
It might be good if the documentation mentioned this so others don't inadvertently break their API following the documentation.