Duplicate data retrived from DB
I want to duplicate the data retrived from databse and want to commit both the original and duplicate data in the database. Could you please help on this process how to handle.
If I am not wrong, you are looking for some sort of way to clone (like a copy).
Another option I would suggest if you dont want to manually do it:
- Retrieve the object
- Use Community commons module clone or deepclone
- Refer Community commons documentation for implementation details
- Retrieve the object/list
- if list retrieved, add loop and iterate over retrieved list
- Add create object with change members mapping original object
- Commit New object – retrieved object not needed to commit, unless changes are made there as well
Rene van Hofwegen