You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the problem is more in the Pojo-Binding but I cannot create an issue in that repo.
when you have a properties definition like this in the JSON "properties" : [ { "name" : "name", "type" : "STRING", "multiple" : true, "values" : [ ] }
and you import this with the exim plugin, the property is created with type DOUBLE. The reason is that DefaultJcrContentNodeBinder is not setting any type in the JcrProperty and one is guessed.
DefaultJcrContentNodeBinder.createJcrValuesFromContentProperty (around line 306)
if (jcrValue != null) {
jcrValues.add(jcrValue);
}
}`
The type is only known, when you we have at least one value and when the property is later set at the jcrNode the property is created as a DOUBLE (around line 195) if (contentProp.isMultiple()) { try { jcrDataNode.setProperty(propName, jcrValues); <- here the resulting type is DOUBLE in case jcrValues is an empty list } catch (ArrayIndexOutOfBoundsException ignore) { // Due to REPO-1428, let's ignore this kind of exception for now... } }
For now we found a workaround by copy/pasting some of the code and setting the propertyTpe explicitly based on the ContentPropertyType. But it would be nice if you can fix this somehow.
Kind regards
Matthias
The text was updated successfully, but these errors were encountered:
Hi,
the problem is more in the Pojo-Binding but I cannot create an issue in that repo.
when you have a properties definition like this in the JSON
"properties" : [ { "name" : "name", "type" : "STRING", "multiple" : true, "values" : [ ] }
and you import this with the exim plugin, the property is created with type DOUBLE. The reason is that DefaultJcrContentNodeBinder is not setting any type in the JcrProperty and one is guessed.
DefaultJcrContentNodeBinder.createJcrValuesFromContentProperty (around line 306)
`for (String stringValue : contentProp.getValues()) {
jcrValue = valueConverter.toJcrValue(contentProp.getType().toString(), stringValue);
The type is only known, when you we have at least one value and when the property is later set at the jcrNode the property is created as a DOUBLE (around line 195)
if (contentProp.isMultiple()) { try { jcrDataNode.setProperty(propName, jcrValues); <- here the resulting type is DOUBLE in case jcrValues is an empty list } catch (ArrayIndexOutOfBoundsException ignore) { // Due to REPO-1428, let's ignore this kind of exception for now... } }
For now we found a workaround by copy/pasting some of the code and setting the propertyTpe explicitly based on the ContentPropertyType. But it would be nice if you can fix this somehow.
Kind regards
Matthias
The text was updated successfully, but these errors were encountered: