How to quickly duplicate many objects and associate with another object?
There is an object “ShoppingCart”, and many “Product” objects associated with it. How can I quickly duplicate all these “Product” objects and associate with another “ShoppingCart” object?
What do you want to achieve? Or what’s your problem to solve?
You can use the Java Action DeepClone from the CommunityCommons module to clone an object with its associations.
To clone many objects you still need a list to iterate over. For each object you can use DeepClone.