on 2019 May 07 4:45 PM
I have created two different yempty extensions named 'letsTravel' and 'examResult'. examResult-items looks like this:
<itemtype code="Result" autocreate="true" generate="true">
<deployment table="Results" typecode="10005" />
<attributes>
<attribute type="java.lang.Integer" qualifier="marks">
<persistence type="property"></persistence>
</attribute>
<attribute type="Trainee" qualifier="traineeId">
<persistence type="property"></persistence>
<modifiers unique="true" />
</attribute>
</attributes>
</itemtype>
and then i am redeclaring the same itemtype in letsTravel like below:
<itemtype code="Result" autocreate="false" generate="false">
<attributes>
<attribute type="TraineeExtended" qualifier="traineeId"
redeclare="true">
<persistence type="property"></persistence>
<modifiers unique="true" />
</attribute>
</attributes>
</itemtype>
i have included the extension in the required-extension tag. even after that it is showing the following error during build.
java.lang.IllegalArgumentException: cannot merge namespace ((letsTravel)) into (()) due to duplicate attribute 'Result.traineeId(TraineeExtended):((letsTravel))::YAttributeDescriptor[letsTravel-items.xml:106(AttributeTagListener)][null]' vs 'Result.traineeId(Trainee):((examResult))::YAttributeDescriptor[examResult-items.xml:92(AttributeTagListener)][PROPERTY]'
Hi - you are getting this error because you have redeclared traineeId
in the same itemtype, Result
. Please note that redeclaring an attribute is possible only in the subtype e.g. in the example given below, entries
has been redeclared in Cart
which is a subtype of AbstractOrder
:
<itemtype code="AbstractOrder" extends="GenericItem" jaloclass="de.hybris.platform.jalo.order.AbstractOrder" autocreate="true" generate="true" abstract="true">
<custom-properties>
<property name="legacyPersistence">
<value>java.lang.Boolean.TRUE</value>
</property>
</custom-properties>
<attributes>
(....)
<attribute autocreate="true" qualifier="entries" type="AbstractOrderEntryList">
<persistence type="jalo"/>
<modifiers read="true" write="true" search="true" partof="true" optional="true"/>
</attribute>
(....)
and then
<itemtype code="Cart" extends="AbstractOrder" jaloclass="de.hybris.platform.jalo.order.Cart" autocreate="true" generate="true">
<deployment table="Carts" typecode="43"/>
<attributes>
<attribute autocreate="true" redeclare="true" qualifier="entries" type="CartEntryCollection">
<modifiers read="true" write="true" search="true" removable="true" optional="true" partof="false"/>
</attribute>
<attribute type="java.lang.String" qualifier="sessionId">
<persistence type="property"/>
<modifiers read="true" write="true"/>
</attribute>
</attributes>
</itemtype>
More details at https://help.sap.com/viewer/d0224eca81e249cb821f2cdf45a82ace/1811/en-US/8bffa9cc86691014bb70ac2d0127...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
12 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.