You define the Relationships in MDM Console.
For each Relationship, you have relationship details.
Ex:
The details go as follows
Name: Upsell
Type: Parent/Child
Name is: Parent
Name2: Upsell For
In the above example, the property value <b>Name is</b> dictates what the name of the relationship is.
Use
Example:<b>RelationshipInfo class</b>
try {
relationshipInfoArray = catalog.GetRelationships();
if (relationshipInfoArray != null) {
for (int i = 0; i < relationshipInfoArray.GetSize(); i++) {
relationshipInfo = relationshipInfoArray.GetRelationshipInfoAt(i);
System.out.println(relationshipInfo.GetName());
}
}
} catch (StringException e) {
e.printStackTrace();
}
Hope this helps;
Please mark helpful answers
Add a comment