Skip to Content
0
Aug 12, 2014 at 06:24 PM

How to add attributes to a many-to-many relation

671 Views

Hi, i'm trying to add a new int attribute (stockThreshold) , to my existing many to many relation :

 <relation code="StoreChain2UniversRel" localized="false">
            <deployment table="StoreChain2UniversRel" typecode="11006" />
             <sourceElement qualifier="ausStoreChains" type="AusStoreChain" cardinality="many"  />
             <targetElement qualifier="categories" type="Category" cardinality="many" />
             
         </relation>

This is what i did :

 <itemtype code="StoreChain2UniversRel" extends="Link" generate="false" autocreate="false">
        <attributes>
           <attribute type="int" qualifier="stockThreshold">
            <defaultvalue>0</defaultvalue>
           </attribute>
        </attributes>
     </itemtype>

but hybris i have a compilation problem :

  1. ERROR in M:\hybris\bin\custom\xxxx\xxxxgcore\src\com\xxxx\core\jalo\XxxxxCoreManager.java (at line 23)
      public class XxxxCoreManager extends GeneratedXxxxxCoreManager
                   ^^^^^^^^^^^^^^^^^^^^^
  The type XxxxxCoreManager must implement the inherited abstract method GeneratedXxxxxCoreManager.setStockThreshold(SessionContext, Link, I


Is there any other solution to fix this ?

Thanks,