Ok, then replace `new $this->name;` with  `$this->classMetadata->getReflectionClass()->newInstance()` here please...