use closure to generate uuid. fix #399

same principle as https://github.com/jackalope/jackalope-doctrine-dbal/pull/167