fix code copy in entity base