cancel
Showing results for 
Search instead for 
Did you mean: 

Enumeration values

12-04-2018 4:36 PM
990 views 3 comments Go to solution
0 Likes
SAP Managed Tags
Subscribe

Hy experts. I have one question for you.

In my item.xml I create a new enum:

    <enumtype code="EmployeeTypeEnum" generate="true" autocreate="true">
                 <description>Type of employee</description>
                 <value code="PROMOTER" />
                 <value code="MANAGER" />
             </enumtype>

Then I want to add this new type yo employee type.

 <itemtype code="Employee" autocreate="false" generate="false">
             <description>Add enum to employee</description>
             <attributes>
                 <attribute qualifier="employeeType" type="EmployeeTypeEnum">
                     <modifiers optional="true" initial="false"/>
                     <description>Use email type for restrictions</description>
                     <persistence type="property" />
                 </attribute>
             </attributes>
         </itemtype>

But after compile and update when I access Employe data I get this error.

Do you know how can I fix this. Thanxs.

0 Likes

Accepted Solutions (1)

Accepted Solutions (1)

arvind-kumar_avinash
Active Contributor
0 Likes

But after compile and update when I access Employe data I get this error.

How are you accessing the Employee data? I did not see any problem with your enumtype and itemtype configurations. You can refer https://wiki.hybris.com/pages/viewpage.action?pageId=294094110#Trail~NewDataModel_-Enumtypes as an example.

Former Member
0 Likes

Sorry. My fault. As it's a xml file I've just updated modules and no compile and stgain the server. After doing that it works ;)

arvind-kumar_avinash
Active Contributor
0 Likes

Great. I feel happy that your problem is solved.

Answers (0)