cancel
Showing results for 
Search instead for 
Did you mean: 

sapproduct Data Hub overrides all Product Categories

former_member348752
Participant
0 Kudos

The publication method resolver determineSupercategories(productID) appears overwrites all categories assigned to a product based on the ImpEx generated.

The following is a sample ImpEx header generated from Data Hub's publication:

 INSERT_UPDATE Product;;unit(code);sapConfigurable;supercategories(code, catalogVersion(catalog(id),version));

Should sapproduct category assignment override all categories of a product? This not only overrides the Classification Classes assigned to a product (supported by CHRMAS, CLSMAS, and CLFMAS), but overrides the Categories directly assigned to the product. Is this the intended functionality?

(On a side note, this ImpEx header from Data Hub may yield poorly performing ImpEx)

Accepted Solutions (1)

Accepted Solutions (1)

former_member224482
Active Contributor
0 Kudos

Is this the intended functionality? Yes.

Do you have measurement to support the poorly performing ImpEx ? Comparing the header given above and the improved header ?

former_member348752
Participant
0 Kudos

From code reviews I've had on several hybris implementations, we've been notified that it has been potentially bad practice while inserting on a relation (especially with larger data sets). It has been recommended to insert directly on the CategoryProductRelation instead of the supercategory attribute.

former_member224482
Active Contributor
0 Kudos

Using Product's supercategories which is the left side of a many to many relationship was selected over the CategoryProductRelation to ease the functional aspect. In early version(5.5.1 and lower) of the Data Hub, it was the only way to achieve removal of relationship values. It's the only way to remove relationship using INSERT_UPDATE.

Due to the missing target item dependency (5.5.1 and lower), it was the only way to ensure categories are assigned at the same time the classification values are provided. Invalid header cause the impex to fail for providing an invalid classification value.

Answers (0)