generating entity action code
for old times' sake