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

How to disable sorting for targetElement in a relation from items.xml

0 Likes
491

for a relation where I have - source (1) to target (N) [1 to N] in items.xml , how do I disable sorting for the targetElement.

View Entire Topic
rohit31_raj92
Active Participant
0 Likes

Hi ,

Can you try like this if you relation types are ordered relation types:

Disable ordering for ordered hybris relations It is now possible (after hybris.5.xx) to disable the sorting of ordered relations which are defined by hybris.You can switch off ordering and therefore greatly improve import and synchronisation performance.

E.g. to disable ordering for the Category to Product relation you simply have to add

relation.CategoryProductRelation.source.ordered=false relation.CategoryProductRelation.target.ordered=false to your local.properties file.

The config property key pattern is relation.relationcode.source|target=false, the relation code needs to be equal to the relation code used in the items.xml and it is case sensitive.

Note : By this way, you can only turn off ordering for ordered relations, you can't turn on ordering for an unordered relation.