Change ~BaseDao() to virtual in BaseDao