Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Computed fields to API #251

Open
jimohalloran opened this issue Nov 10, 2020 · 0 comments
Open

Adding Computed fields to API #251

jimohalloran opened this issue Nov 10, 2020 · 0 comments

Comments

@jimohalloran
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant