persistence in entity generator