title: Schema hasn't been registered for model \"ref\".\nUse mongoose.model(name, schema)
body: <p>i'm new to typegoose , i am trying to populate the category field using ProductModel.find().populate('category') but the program throws that error: <strong>Schema hasn't been registered for model &quot;ref&quot;.\nUse mongoose.model(name, schema)</strong> May I know what I am missing?</p>
  <p>My product model:</p>
  <pre><code>import { getModelForClass, prop, Ref, plugin } from '@typegoose/typegoose';
  import { Category } from './category.model';
  
  export class Product {
    @prop({ required: true })
    public name?: string;
  
    @prop({ default: null })
    public photo?: string;
  
    @prop({ default: 0 })
    public rating?: number;
  
    @prop({ ref: () =&gt; Category, required: true })
    public category?: Ref&lt;Category&gt;;
  }
  
  export default getModelForClass(Product);
  
  </code></pre>
  <p>My category model:</p>
  <pre><code>import { getModelForClass, prop } from '@typegoose/typegoose';
  
  export class Category {
    @prop({ required: true })
    public name?: string;
  
    @prop({ default: null })
    public photo?: string;
  }
  
  export default getModelForClass(Category);
  
  </code></pre>
  <p>I am using the first-time typegoose so I need a good explanation for this.</p>