You don’t need to commit the original address (unless you want to). Instead, just create new Address objects and add those to the AddressList. In the Create Address action you will need to copy the attributes from your original Address object into the new object. Outside the loop you commit the AddressList.
There is a Clone and Deepclone action in the Community Commons module that can help copy the attributes, but if you are unsure of how these work, you will probably find it easier to manually copy the values.
I hope this makes sense.
Before merge, create a list of type Adresse
After the merge action, create a new object Adresse and add to list.
When intLoop > 1 returns false, commit the list
You can also use a while loop activity
You are committing the same object multiple times. This won’t create a new entry in the database, just update the same entry.
In your loop, you will need to use a Create action to create a new object and commit that.
As Ruud mentions in his answer, it is best practice to create a List first, and in the loop create the new objects and add them to the list before committing the list when the loop finishes.
I hope this helps to explain what is happening and how to fix it to get the result you need.
Thanks for your help.
If i create a new object, add it to the list (and commit the list this in a loop) i get x new entries but empty.
If i commit the object i get one entry with the data.
How can i commit the data and store this x-times in a list to comit the list?
i played a little with all th epossibilities but don’t know how to store the last commit?
hope you understand ;-)
i have to commit the object (Adresse) first to get the last input from the user.
This last input from the user should be saved x times.
As soon as i commit the object i lose its content for any lists adding
So perhaps i miss something but it doensn’t work yet..
Yes! That makes it clear! thanks a lot!