Vincent,
I wanted to make sure I understood how this works, so I created a test project. It is similar to the structure you describe.
Here is the Domain Model I created:
I added the autonumber attributes to better understand the behavior of DeepClone.
I created a page to see the objects:
The button highlighted in red points to a DeepClone microflow.
Here is what the page looks like after I create one Assessment with 2 questions:
And here is what the microflow looks like:
Initially, I configured DeepClone like this:
The result of this was:
The Questions were not cloned.
So I made this adjustment in DeepClone:
And the result was this:
Assessment AND Questions were cloned. I think this is what you were trying to achieve.
Note that this is a 'Reverse' association because the Many entity of the 1>>Many association is what you want to clone. If you used DeepClone to Clone the questions, you could leave all arguments except Source and Target empty and the Question would be cloned as well as the Assessment.
Hope that helps,
Mike
From the Javasource:
/**
* Clones objects, their associations and even referred objects.
*
* - Source: the original object to copy
* - Target: the object to copy it into (should be of the same type, or a specialization)
* - MembersToSkip: members which should not be set at all
* - MembersToKeep: references which should be set, but not cloned. (so source and target will refer to exactly the same object). If an association is not part of this property, it will be cloned.
* - ReverseAssociations: 1 - 0 assications which refer to target, which will be cloned as well. Only the reference name itself needs to be mentioned.
* - excludeEntities: entities that will not be cloned. references to these entities will refer to the same object as the source did.
* - excludeModules: modules that will have none of their enities cloned. Behaves similar to excludeEntities.
*
* members format: <membername> or <module.association> or <module.objecttype/membername>, where objecttype is the concrete type of the object being cloned.
*
* reverseAssociation:
* <module.relation>
*
* membersToSkip by automatically contains createdDate and changedDate.
* membersToKeep by automatically contains System.owner and System.changedBy
*
* Note that DeepClone does commit all objects, where Clone does not.
*/
And from the source code it looks like it is checking for null. So do not enter empty but keep the field empty and do not enter anything.
Regards,
Ronald