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

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


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" />

This is what i did :

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

but hybris i have a compilation problem :

  1. ERROR in M:\hybris\bin\custom\xxxx\xxxxgcore\src\com\xxxx\core\jalo\ (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 ?