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

Any One to Many example implemented by collectiontype not in relation type in hybris?

nikhil-ku
Explorer
0 Likes
425

Any One to Many example implemented by collectiontype not in relation type in hybris?

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Likes

As a simple use case there is a one to many relation between Delivery mode and supportedPaymentTypes and implemented as a collection.

core-items.xml

 <collectiontype code="PaymentModeCollection" elementtype="PaymentMode" autocreate="true" generate="false"/>
 <itemtype code="PaymentMode" extends="GenericItem">
<itemtype code="DeliveryMode" extends="GenericItem">
...
          <attributes>
                  <attribute autocreate="true" qualifier="supportedPaymentModes" type="PaymentModeCollection"
                           generate="true">
                    <persistence type="jalo"/>
                    <modifiers read="true" write="true" search="false" optional="true"/>
                </attribute>
         </attributes>
</itemtype>