Hi all.
I need to manage 2 set of data structured in a Master&Detail relation (2 masters with their 2 related details).
I have 2 Entity Collections master. In the single entity of this masters are loaded the detail entity in the respectively navigators, if needed.
I have to copy from the Master source A to Master destination B one or more record. Consequently I have to copy also the related details.
I create the new entity for the master (creating a new entity and valorising it with the value of the master source). After that I create the new detail entities and I add them on the navigator of the master.
If I save the entity collection I get an exception: I cannot insert ID null on the foreign key of the detail record (id referring to the master). The fk_idMaster is rightly null because the master entity not yet been created. I thought / hoped that, belong to the navigator, the foreign keys of the details were automatically populated when saving with recurse set to true.
What am I doing wrong?
There is a solution more conveniently?
Thanks and regards
Mirco