title: nestjs- how to define multiple types for a field in mongodb mongoose with class properties in nest
body: <p>take a look in this code: <br></p>
  <pre><code>@prop({
      required: true,
      autopopulate: true,
      ref: Fund || Project,
    })
    organization: Ref&lt;Fund&gt; | Ref&lt;Project&gt;;
  </code></pre>
  <p><br><br>
  the property &quot;organization&quot; type can be Fund or Project. <br>
  in this example when the type is &quot;Fund&quot; i get the object. but when the type is &quot;Project&quot; i get null.<br>
  I dont know nest so much and I am starter in nest. I started using it very recently.
  <br>
  how can i solve that problem??<br>
  thanks.</p>