title: Nestjs: Error discriminator with name "Teacher" already exists
body: <p>I try to set discriminators with mongoose in my nestjs( application that you can find at <a href="https://github.com/jeydi243/gesi-backend" rel="nofollow noreferrer">Github project</a>.
  I want that Teacher, Student inherit from Person schema.</p>
  <p>Example of code that show how i create Schema:
  <a href="https://i.stack.imgur.com/WpWXQ.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WpWXQ.jpg" alt="Schema Person" /></a>
  <a href="https://i.stack.imgur.com/unPR5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/unPR5.png" alt="Schema Teacher" /></a>
  <a href="https://i.stack.imgur.com/Owa7R.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Owa7R.png" alt="Schema Employee" /></a></p>
  <p>This is example that import Mongoose module defining descriminators for schemas(Employee,Teacher,Student)
  <a href="https://i.stack.imgur.com/aX7MP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aX7MP.png" alt="Example of code that import Mongoose module defining descriminators for schemas(Employee,Teacher,Student)" /></a></p>
  <p>But when i try to start application i have this error in terminal:
  <img src="https://i.stack.imgur.com/KUXq0.png" alt="Terminal error" /></p>
  <p>This is all nestjs version:
  **</p>
  <ol>
  <li>@nestjs/common&quot;: &quot;^8.0.0&quot;,</li>
  <li>&quot;@nestjs/config&quot;: &quot;^1.1.6&quot;,</li>
  <li>&quot;@nestjs/core&quot;: &quot;^8.0.0&quot;,</li>
  <li>&quot;@nestjs/jwt&quot;: &quot;^8.0.0&quot;,</li>
  <li>&quot;@nestjs/mapped-types&quot;: &quot;*&quot;,</li>
  <li>&quot;@nestjs/microservices&quot;: &quot;^8.4.2&quot;,</li>
  <li>&quot;@nestjs/mongoose&quot;: &quot;^9.0.2&quot;,</li>
  <li>&quot;@nestjs/passport&quot;: &quot;^8.1.0&quot;,</li>
  <li>&quot;@nestjs/platform-express&quot;: &quot;^8.0.0&quot;,</li>
  <li>&quot;@nestjs/platform-socket.io&quot;: &quot;^8.2.4&quot;,</li>
  <li>&quot;@nestjs/swagger&quot;: &quot;^5.2.0&quot;,</li>
  <li>&quot;@nestjs/websockets&quot;: &quot;^8.2.4**</li>
  <li>And &quot;typescript&quot;: &quot;^4.3.5&quot;</li>
  </ol>
  <p>Can i have help please.You can run project locally.</p>