Added support for custom constructors in repository.