cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Mandatory attributes

Former Member
0 Likes
2,669

how to check the mandatory attributes required to create a data row for insertion in a table?

Accepted Solutions (1)

Accepted Solutions (1)

arvind-kumar_avinash
Active Contributor
0 Likes

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 )

Answers (1)

Answers (1)

sduvvuri
Explorer
0 Likes

You can check for that type in items.xml. All the attributes which are having optional="false" as their modifier are mandatory else optional.