Technote

(troubleshooting)
IDResolve does not match up keys for new data with existing data in the database
Problem(Abstract)
You are loading new data into the database by way of the Massload tools. When IDResolve is resolving IDs for the new data, the data is being loaded with new IDs rather than using the IDs that are already in the database.

Cause IDResolve will resolve any new data with a new ID. It cannot link the new data to the existing ID unless the existing ID is in the XML file before the new data. If the existing data is not preset, a new ID is assigned. Resolving the problem To ensure that the IDs are resolved to match those already present in the database, include the existing data in the XML files that you massload. This way the new entries can be correctly related to the existing IDs.

The following example demonstrates why the error occurs, and how it can be resolved:

This same problem can apply to any table within WebSphere Commerce and does not strictly apply to catalog attributes over different languages.

A catalog already has English data loaded into the database. The English catalog has a shirt with two attributes, Colour and Size.

ATTRIBUTE_ID        LANGUAGE_ID ATTRTYPE_ID  NAME      DESCRIPTION
------------------- ----------- -----------  -------   -----------
             12090          -1 STRING       Colour    Colour
             12124          -1 STRING       Size      Size

The store is now adding the French language to their site, so they want to now add French data to the existing catalog.

They load the data, and their ATTRIBUTE table now appears as follows:

ATTRIBUTE_ID        LANGUAGE_ID ATTRTYPE_ID  NAME      DESCRIPTION
------------------- ----------- -----------  -------   -----------
             14151          -2 STRING       Colour    Couleur
             14443          -2 STRING       Size      Taille
             12090          -1 STRING       Colour    Colour
             12124          -1 STRING       Size      Size

The French attributes have a new ATTRIBUTE_ID, rather than having the same ATTRIBUTE_ID, but a different LANGUAGE and DESCRIPTION.

Load the French data but also include the English data in the XML before the French data. This will allow the XML Transform tool to associate the two Attributes correctly.

<attribute attribute_id="@attribute_id_Size_203010063" name="Size" attrtype_id="STRING" description="Taille" catentry_id="@203010063@-2003" language_id="-2"/>
<attribute attribute_id="@attribute_id_Size_203010063" name="Size" attrtype_id="STRING" description="Size" catentry_id="@203010063@-2003" language_id="-1"/>
<attribute attribute_id="@attribute_id_Colour_203010063" name="Colour" attrtype_id="STRING" description="Couleur" catentry_id="@203010063@-2003" language_id="-2"/>
<attribute attribute_id="@attribute_id_Colour_203010063" name="Colour" attrtype_id="STRING" description="Colour" catentry_id="@203010063@-2003" language_id="-1"/>

When performing the IDResolve, the data that was already in the database is loaded first, causing the IDs to be resolved to those already present. When the French (new) attributes are processed, they will be associated correctly to the keys used by the English Data.

ATTRIBUTE_ID        LANGUAGE_ID ATTRTYPE_ID  NAME      DESCRIPTION
------------------- ----------- -----------  -------   -----------
             12090          -1 STRING       Colour    Colour
             12090          -2 STRING       Colour    Couleur
             12124          -1 STRING       Size      Size
             12124          -2 STRING       Size      Taille
Cross Reference information
Segment Product Component Platform Version Edition
Commerce WebSphere Commerce Enterprise Utilities/Tools AIX, i5/OS, Linux, Solaris, Windows 6.0, 6.0.0.1, 6.0.0.2, 6.0.0.3, 6.0.0.4 All Editions
Commerce WebSphere Commerce Business Edition Utilities/Tools AIX, i5/OS, Linux, Solaris, Windows 5.6, 5.6.1, 5.6.1.1, 5.6.1.2, 5.6.1.3 Business Edition
Commerce WebSphere Commerce - Express Utilities/Tools AIX, i5/OS, Linux, Solaris, Windows 5.6, 5.6.1, 5.6.1.1, 5.6.1.2, 5.6.1.3, 6.0, 6.0.0.1, 6.0.0.2, 6.0.0.3, 6.0.0.4 Express
Commerce WebSphere Commerce Developer Enterprise Utilities/Tools AIX, i5/OS, Linux, Solaris, Windows 6.0, 6.0.0.1, 6.0.0.2, 6.0.0.3, 6.0.0.4 All Editions
Commerce WebSphere Commerce Developer Business Edition Utilities/Tools AIX, i5/OS, Linux, Solaris, Windows 5.6, 5.6.1, 5.6.1.1, 5.6.1.2, 5.6.1.3 Developer Business Edition
Commerce WebSphere Commerce Developer Professional Edition Utilities/Tools AIX, i5/OS, Linux, Solaris, Windows 5.6, 5.6.1, 5.6.1.1, 5.6.1.2, 5.6.1.3, 6.0, 6.0.0.1, 6.0.0.2, 6.0.0.3, 6.0.0.4 Developer Professional Edition
Commerce WebSphere Commerce Developer Express Utilities/Tools AIX, i5/OS, Linux, Solaris, Windows 5.6, 5.6.1, 5.6.1.1, 5.6.1.2, 6.0, 6.0.0.1, 6.0.0.2, 6.0.0.3, 6.0.0.4 Developer Express
   

Document Information

Current web document: http://www.ibm.com/support/docview.wss?uid=swg21236085