fix bug when persistence object extends model class