TYPO3 Exception 1260881688

The error occurs if there is a newly created Domain Object where the attribute uid is not set. This happens because newly created Domain Objects were not persisted directly after adding them to a repository. You have to get an instance of the PersistenceManager:

$persistenceManager = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\PersistenceManager')

and persist it by hand with $persistenceManager->persistAll().