on ‎2019 Apr 10 1:58 PM
how to check the mandatory attributes required to create a data row for insertion in a table?
Request clarification before answering.
Hi - we know that in Hybris, we do not insert data directly in tables; rather, we insert data into the tables through the itemtype(s) which have been defined in items.xml files and therefore, we generally use ImpEx script instead SQL script for data insertion. Since an itemtype may be defined in many items.xml files (e.g. the itemtype, Product has been defined in many items.xml files), you may find it difficult to check the attributes if you start looking into each of these ( items.xml ) files. Therefore, Hybris provides a nice interface to list the complete definition of an itemtype by combining its definitions from various items.xml files. Please login to backoffice > Go to System > Types > Search for the itemtype > Open the tab XML REPRESENTATION. In the itemtype definition, if you find optional="false", the attribute is mandatory. The default value of the modifier, optional is true (Ref: https://help.hybris.com/1811/hcd/8bff7a568669101488a5e40cb7bbd0b9.html )

You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can check for that type in items.xml. All the attributes which are having optional="false" as their modifier are mandatory else optional.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.