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

can we add validation constraints on categories attributes

0 Likes
195

hi Expert,

as we can see that categories is not direct attribute of product Model its coming from relation. so my requirement is to apply validation constraint on this categories attribute. i tried the below code but unfortunately did not work.

INSERT_UPDATE NotNullConstraint; descriptor(enclosingType(code), qualifier); id[unique = true, allownull = true]                 ; qualifier[allownull = true]; severity(code, itemtype(code)); target[allownull = true]                   ; type(code) ; constraintGroups(id)                                              								    ; message[lang = en];
                                ; Product:supercategories             ;ProductSuperCategoryNotNullConstraint              ; supercategories            ; WARN:Severity               ; de.hybris.platform.core.model.product.ProductModel   ; Product ; defaultBackofficeValidationGroup,defaultBackofficeCoverageGroup ,rcValidationGroup,rcProductSuperCategoryCoverageGroup     ; Product super category must not be Null       
 

Accepted Solutions (0)

Answers (0)