Nuxeo Platform has two kinds of multi-valued fields, the list and the array.
The lists are defined such as below:
<xs:element name="listOfStrings"> <xs:complexType> <xs:sequence> <xs:element name="role" minOccurs="0" maxOccurs="unbounded"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:pattern value="[a-zA-Z0-9]+"></xs:pattern> </xs:restriction> </xs:simpleType> </xs:element> </xs:sequence> </xs:complexType> </xs:element>
The arrays are defined such as below:
<xs:element name="arrayOfStrings"> <xs:simpleType> <xs:list> <xs:simpleType> <xs:restriction base="xs:string"> <xs:pattern value="[a-zA-Z0-9]*"></xs:pattern> </xs:restriction> </xs:simpleType> </xs:list> </xs:simpleType> </xs:element>
For the lists we can declare the container and the elements non nullable by adding nillable="false" nxsv:nillable="false" on the xs:element of the container or the elements.
But for the arrays we can only declare the container non nullable.
Since NXP-31918, we added the possibility to put nxsv:nillable="false" on the xs:list in order to force the elements to be non null.
Studio should be able to put this new attribute when the user choose to make their elements non nullable/required.
- is related to
-
NXP-31918 Produce addNotNullViolation for '[null]' for multivalued String properties
- Resolved