public function __construct(IModel $model, DbalMapper $mapper) { $this->model = $model; $this->mapper = $mapper; $this->metadataStorage = $model->getMetadataStorage(); }