based on entitydao