Behavior of entity import in EntityInspector screen

Hi, thanks always for your great support.

In the EntityInspector screen, I would like to check how relationships are dealt with.
Lets say I have a Customer with an one-to-many association to Orders.

When I export a Customer entity, I assume all related objects get exported together.
Now lets say I perform the following actions
1: Export my Customer entity (with Orders) from EntityInspector screen.
2: Delete the related Orders in my Cuba application
3: Import the Customer entity (with Orders) from the file exported in step 1.

In that case, will the related Order entities be re-created?
Or will the Orders in the imported Customer entity point to null (deleted Orders)?

Similarly, again with a Customer with multiple Orders:
1: I export one Order (order1, associated to customer1)
2: I delete order1 in my cuba application
3: I import order1, from file created in step 1

In this case, will the import correctly add the imported order1 to the collection of orders for Customer1?

Thank you!

Hi!
Entity Inspector screen doesn’t export related collections. Only the data that is visible in the table of entity inspector (local fields and *-to-one references will be exported).
When data is imported the import policy is to ignore missing references. For instance if you import an Order, but the customer of this order is absent in the database, then the customer field of the imported Order will be null.

If you need some another import/export behavior, you can use the EntityImportExportService in your screen. You can find examples of its usage in RolesBrowser or GroupBrowser classes of the platform. With this API you can specify what data should be exported and how all the references should be handled during the import.

Understood with regards to the entity inspector functions.
I will look into th EntityImportExportService!

Many thanks,

Matthis