Hey Ramon,
maybe this post could help you:
Also I guess the egg "plone.app.transmogrifier" does something similar in the file "uidupdater.py".
Plone Foundation Code of Conduct