Mandatory object fields & CSV import

Mandatory object fields & CSV import
0.0 0
Tags: #<Tag:0x00007f9fa8a62508>



I’m using the CSV Adapter to import some data in object A.

Object A is related to object B (the id of object B is a mandatory functionnal key of object A) which itself is related to objects C & D (the ids of C & D are the mandatory functional keys of object B). The CSV used contains the functional keys of object C & D (it actually uses other fields to fill the functional keys of object D).

I would expect the adapter to fail if any of the functionnal keys of C & D are absent, but the observed behavior is that if any of the keys is present, the adapter seems to take the first found object B that corresponds to the criteria.

Is there any way of achieving this without having to write a custom adapter?

PS: Updated with model.


It might be worth mentioning that C & D objects both have two functionnal keys.

I also noticed another unexpected behavior: the imported functionnal keys can carry any random value, if they do not exist, the XML Import will fill in with the first found object B.

In the following example, the values of the keys for object C do not exist, but the import is successful and assigns the existing values (key1 and key2)

<?xml version="1.0" encoding="UTF-8"?>
<simplicite xmlns:xsi="" xmlns="" xsi:schemaLocation="">