connect repository model to document