Save UUID along with the referenced entity ID.