refactoring to use the common repo templated & BasePersistentModel