gtag

Hybris - Ordering of one to many relations.

 To order one to many relations in Hybris, Follow the following steps. 


1. add collectiontype="list" and order="true" to the relation type.

    <relation localized="false" code="Product2Topic"> 
       <sourceElement type="Product" cardinality="one" qualifier="product"/> 
       <targetElement type="Topic" cardinality="many"                  
                        qualifier="topic" collectiontype="list" ordered="true"/> 
    </relation>

2. import impex with target elements in a single line with order.

    INSERT_UPDATE Topic; code [unique = true];topic[lang = en];
    ;Technical;"Technical" 
    ;Product;"Product" 
    ;Other;"Other" 

    INSERT_UPDATE Partner; uid[unique = true]; topic(code); 
    ;01; Technical, Product, Other