This is duplicating the code in `ModelRepository.findAll` and should be removed or moved to Model/ModelRepository, see the comments above.