Enum tipindeki alanlar için varsayılan değer atamak

 
<enumtypes>
    <enumtype code="MyEnum" generate="true" autocreate="true">
        <value code="MyValue1" />
        <value code="MyValue2"/>
    </enumtype>
</enumtypes>

<itemtype code="MyItem" extends="BaseItem" autocreate="true" generate="true" jaloclass="de.hybris.platform.warehousing.jalo.MyItem">
    <attributes>
        <attribute type="MyEnum" qualifier="myAttribute">
            <modifiers optional="false" />
            <defaultvalue>em().getEnumerationValue("MyItem", "MyValue1")</defaultvalue>
            <description>My attribute.</description>
            <persistence type="property" />
        </attribute>
    </attributes>
</itemtype>

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.