added dynamic persistence type resolution