CRM-13938, modify gencode to generate entities