/** * Configure the metadata for the entity this repository interacts with * * Override this method to set additional fields or define relationships with other entities * */ protected function configureMetadata() { $this->entityMetadata->setCollection($this->collectionName); if (!empty($this->primaryKey)) { $this->entityMetadata->setPrimaryKey($this->primaryKey); } }