How to quickly duplicate many objects and associate with another object?

2
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?
asked
1 answers
4

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.

answered