changed database persist and update interface from obj reference to shared ptr