devdocs
devdocs copied to clipboard
Missing example for scalar attributes
New topic request
Please add an example for a scalar attribute and how to persist in database at https://devdocs.magento.com/guides/v2.4/extension-dev-guide/extension_attributes/adding-attributes.html
Description
The docs accurately describe how to add non scalar attributes but there's no clear example for scalar attributes. Should we add them as a table column, as an attribute or always use as a separate table? What's the proper implementation to follow for extension attributes?
Content checklist
- [ ] The topic provides an explanation of how adding scalar extension attributes works.
- [ ] The topic provides steps for persisting scalar attributes in the database.
- [ ] The topic contains code samples that shows plugins for a scalar attribute and scalar attribute array use case.
Additional information/resources
As it is now it seems that we can just add the xml declaration, use the attributes and they will automatically get saved in the database which is not the case. I browsed many questions on stackexchange about this with the same confusion.
Moreover there are no guidelines to promote a good usage example so everyone will implement as he sees fit
Hi @ioweb-gr. Thank you for your report. To speed up processing of this issue, make sure that you provided sufficient information.
Add a comment to assign the issue: @magento I am working on this
- Join Magento Community Engineering Slack and ask your questions in #github channel.
@ioweb-gr - You need to provide the relevant page links for the "The docs accurately describe how to add non scalar attributes" statement - otherwise we cannot review and determine what examples should be give (if any)
You'll need to do this in the next few days or we'll have to close the issue as currently it is incomplete.
Thanks!
Oh, I clicked on the devdocs page and pressed report an issue, I'm wondering why it didn't get the title :( https://devdocs.magento.com/guides/v2.4/extension-dev-guide/extension_attributes/adding-attributes.html
Oh, I clicked on the devdocs page and pressed report an issue, I'm wondering why it didn't get the title :( https://devdocs.magento.com/guides/v2.4/extension-dev-guide/extension_attributes/adding-attributes.html
Can you add this to the PR description please? So it's easy for the person doing the task to get the information? things can get lost in comments :)
Sure , how about now?