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

I have an itemtype with two unique attributes but still able to add the item with the same unique pair.

Former Member
0 Kudos
1,003

Hello, all I know is the declaration saying the attribute is uniques should be enough for consistent identification of an object but I guess I was wrong. What have I missed? I have this declaration

 <itemtype code="CisZipCode" jaloclass="com.company.ciscustomer.jalo.CisZipCode">
             <deployment table="CisZipCode" typecode="28012"/>
             <attributes>
                 <attribute qualifier="zipCode" type="java.lang.String">
                     <modifiers optional="false" unique="true" initial="true"/>
                     <persistence type="property"/>
                 </attribute>
                 <attribute qualifier="country" type="Country">
                     <modifiers optional="false" unique="true" initial="true"/>
                     <persistence type="property"/>
                 </attribute>
             </attributes>
             <indexes>
                 <index name="zipIdx">
                     <key attribute="zipCode"/>
                 </index>
             </indexes>
         </itemtype>

And I am still added the second similar object

Accepted Solutions (0)

Answers (1)

Answers (1)

arvind-kumar_avinash
Active Contributor
0 Kudos

Hi - looking into items.xml may not give you the full picture of the itemtype as the itemtype may be defined in multiple items.xml files. Please check the itemtype, CisZipCode in backoffice and you will find that there are more unique attributes than these two ( zipCode and country ).

Please also check my answer https://answers.sap.com/questions/12771632/mandatory-attributes.html?childToView=12805441#answer-128... for similar explanation.