Open Flaurite opened 2 years ago
There are the two options of the root cause of the problem: 1) io.jmix.dynattr.impl.DynAttrLifecycleListener#afterEntityLoad working process depends on DynAttrQueryHints.LOAD_DYN_ATTR. The first cause of the problem might be the absence of this hint despite the fact that the screen contains Dinamic attributes facet.
2) The second option might be the wrong work of the io.jmix.dynattr.impl.DynAttrManagerImpl#addDynamicAttributesState method. This method doesn't contain adding to the state of the "dynamicModel". As the result of this fact the error message is appeared.
It is need to discover which of this two options is right.
It looks like the first one is more logical(if the facet is used on the form the dataLoader should be used with the LOAD_DYN_ATTR hint).
It might be the both options are actual.
The issue is reproduced on the last version of the 2.x(master) branch.
Description
Jmix: 1.3.2
Demo project contains configured
Category
forUser
entity and includes one attribute:+cats-cat-name
.User edit/browse contains
<loader dynamicAttributes="true"/>
Demo project: trdynattr.zip
Steps to reproduce
Case 1.
AR
Case 2
<column id="+cats-cat-name"/>
AR Field with Dynamic Attribute is empty.
Note All these cases are not reproduced if you configure Dynamic Attribute Visibility for User edit/browse screens.
Reason
dynamicAttributes
attribute is not processed for Data Loader