2017-01-20 5 views
0

Hybrisで割り当てられた異なるスーパーカテゴリを持ついくつかの製品があります。Hybrisの更新カテゴリを製品のために

私はこれらの製品にスーパーカテゴリをimpex経由で追加します。

$supercategories=supercategories(code,$catalogVersion) 
UPDATE Product;code[unique=true];$catalogVersion[unique=true];supercategories(code,$catalogVersion)[mode=append] 
;ProductName;;1017 
;ProductName1;;1017 

スーパーカテゴリが、私は製品、または1つが最初に行くかを決定するために、更新にカテゴリを割り当てることだ瞬間に、最初の行く私が定義されてできる方法がある場合、私は思ったんだけど。

私はいくつかの言葉で、スーパーカテゴリ368が最初のものである必要があります。

Currently is   New Result 
297     368 
368     686 
686     297 

enter image description here

+0

どちらが先に行くのでしょうか?カテゴリが表示される順序について話していますか? –

答えて

0

あなたはsupercategoriesためordered="true"を有効にするために関係を変更する必要があります。

'真' の追加発注属性が秩序を維持するために生成される場合は[0..1]

= "ブール" を命じました。デフォルトは 'false'です。

OOTB:

<relation code="CategoryProductRelation" autocreate="true" generate="true" localized="false"> 
     <deployment table="Cat2ProdRel" typecode="143"/> 
     <sourceElement qualifier="supercategories" type="Category" cardinality="many" ordered="false"> 
      <description>Super Categories</description> 
      <modifiers read="true" write="true" search="true" optional="true"/> 
     </sourceElement> 
     <targetElement qualifier="products" type="Product" cardinality="many" collectiontype="list" ordered="true"> 
      <description>Products</description> 
      <modifiers read="true" write="true" search="true" optional="true"/> 
     </targetElement>   
    </relation> 

TO:

<relation code="CategoryProductRelation" autocreate="true" generate="true" localized="false"> 
     <deployment table="Cat2ProdRel" typecode="143"/> 
     <sourceElement qualifier="supercategories" type="Category" cardinality="many" ordered="true"> 
      <description>Super Categories</description> 
      <modifiers read="true" write="true" search="true" optional="true"/> 
     </sourceElement> 
     <targetElement qualifier="products" type="Product" cardinality="many" collectiontype="list" ordered="true"> 
      <description>Products</description> 
      <modifiers read="true" write="true" search="true" optional="true"/> 
     </targetElement>   
    </relation> 

私はredeclare=trueは関係タグで作業したりしませんかどうかわからないけど、supercategoriesは= "false" をご注文のためにあるため、順序ますそれが本当でない限り維持されません。

関連する問題