Search code examples
sap-commerce-cloud

Adding New attribute in a existing type in Hybris 5.3 is not showing in HMC and HAC


I have added a new attribute in one existing type. my attribute is available in model class and also in jalo classes. But when i checked in HMC it is not showing the attribute in admin tab. As well as in type's XML configuration does not have that attribute in HMC.

steps done by me: added my attributes in items.xml where other attributes also added earlier. after this i have run ant clean all and checked the model class and attribute is there in model class.

used below code for adding my attribute in items.xml:

<itemtype code="Customer" autocreate="false" generate="false">
            <attributes>
<attribute qualifier="OosFlag" type="java.lang.Boolean">
                    <description>OosFlag</description>
                    <defaultvalue>Boolean.TRUE</defaultvalue>
                    <modifiers read="true" write="true" search="true" optional="false"/>
                    <persistence type="property"/>
                </attribute>
            </attributes>
            </itemtype>

Solution

  • You need to update your type-system in the database. That means you need to do an UPDATE in the admin-console.

    The generated classes are only templates. The important point is what in the database stands.

    P.S. you should start your attributes always with a lower-case.