From 26f71819cf51a1c2a982201b6ef7f462b5087772 Mon Sep 17 00:00:00 2001 From: Maxim Gorbunkov Date: Wed, 23 Nov 2016 09:05:01 +0400 Subject: [PATCH] PL-8243 child elements of collection dynamic attributes must have an entityId and code fields filled --- .../core/app/dynamicattributes/DynamicAttributesManager.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/core/src/com/haulmont/cuba/core/app/dynamicattributes/DynamicAttributesManager.java b/modules/core/src/com/haulmont/cuba/core/app/dynamicattributes/DynamicAttributesManager.java index ecfc763984..69a4945fd7 100644 --- a/modules/core/src/com/haulmont/cuba/core/app/dynamicattributes/DynamicAttributesManager.java +++ b/modules/core/src/com/haulmont/cuba/core/app/dynamicattributes/DynamicAttributesManager.java @@ -300,6 +300,8 @@ public class DynamicAttributesManager implements DynamicAttributesManagerAPI { CategoryAttributeValue childCAV = metadata.create(CategoryAttributeValue.class); childCAV.setParent(categoryAttributeValue); childCAV.setValue(value); + childCAV.setEntityId(categoryAttributeValue.getEntityId()); + childCAV.setCode(categoryAttributeValue.getCode()); childCAV.setCategoryAttribute(categoryAttributeValue.getCategoryAttribute()); em.persist(childCAV); });