cobwebch / external_import

Other
20 stars 16 forks source link

Consider select-type fields with minitems = 0 to be nullable #337

Open fsuter opened 3 months ago

fsuter commented 3 months ago

In the case of select-type fields (single, multiple, tree, IRRE) it must be possible to set them to having no relations if the external data contains a null value. With #302, this became possible but not nice/official, as it implied add nullable => true to the TCA definition of such fields. Since this is not officially accepted, it is undocumented.

But select-type fields have a minitems property. If said property is 0 or not set at all, it means that the field is okay to accept no relations at all. This is equivalent to other fields being nullable.

Although the mapping configuration allows External Import to set a default value in such a case, the tool should also take into account any default value defined in the regular TCA.