-
Type: Bug
-
Status: Open
-
Priority: Major
-
Resolution: Unresolved
-
Affects Version/s: 8.10, 9.1
-
Fix Version/s: QualifiedToSchedule
-
Component/s: Core MarkLogic
-
Story Points:3
Update for list of complex type elements with null as first value doesn't work with MarkLogic as a backend.
Furthermore this leads to a corrupted data state in MarkLogic, the complex element is replaced by a list of primitive type.
This issue was highlighted by TestSQLRepositoryProperties.testComplexListElementNullInStorage.
Original document:
{ "tp:complexList:": [ { "string": "for" }, { "string": "bar" } ] }
Expected document:
{ "tp:complexList:": [ {}, { "string": "bar" } ] }
What we get:
{ "tp:complexList:": [ "{string=bar}" ] }
Error in test:
testComplexListElementNullInStorage(org.nuxeo.ecm.core.TestSQLRepositoryProperties) Time elapsed: 0.025 sec <<< ERROR! java.lang.ClassCastException: [Ljava.lang.String; cannot be cast to java.util.List at org.nuxeo.ecm.core.storage.dbs.DBSDocument.getChildAsList(DBSDocument.java:401) at org.nuxeo.ecm.core.storage.dbs.DBSDocument.getChildAsList(DBSDocument.java:82) at org.nuxeo.ecm.core.storage.BaseDocument.readComplexProperty(BaseDocument.java:672) at org.nuxeo.ecm.core.storage.dbs.DBSDocument.readDocumentPart(DBSDocument.java:839) at org.nuxeo.ecm.core.api.DocumentModelFactory.createDataModel(DocumentModelFactory.java:208) at org.nuxeo.ecm.core.api.AbstractSession.getDataModel(AbstractSession.java:1894) at org.nuxeo.ecm.core.api.impl.DocumentModelImpl.loadDataModel(DocumentModelImpl.java:445) at org.nuxeo.ecm.core.api.impl.DocumentModelImpl.getDataModel(DocumentModelImpl.java:455) at org.nuxeo.ecm.core.api.impl.DocumentModelImpl.getPart(DocumentModelImpl.java:1219) at org.nuxeo.ecm.core.api.impl.DocumentModelImpl.getProperty(DocumentModelImpl.java:1267) at org.nuxeo.ecm.core.api.impl.DocumentModelImpl.getPropertyValue(DocumentModelImpl.java:1326) at org.nuxeo.ecm.core.TestSQLRepositoryProperties.testComplexListElementNullInStorage(TestSQLRepositoryProperties.java:416)