title: Foreign key composed from multiple models
body: <p>I am using mongo and mongoose and I am trying to model my app.<br>
  I have the following models: ProductA, ProductB and ProductChat.<br>
  Each Product can have many Chats. Each chat is related to one and only product (A or B).<br>
  I'd like ProductChat to have a reference to the relevant product document. I thought about adding productType, productId fields to ProductChat:
  <code>
  const ProductChatSchema = new Schema({
      ...
      ...
      productType: {
          type: 'String',
          required: true,
          enum: [ 'A', 'B' ]
      },
      product: {
          type: Schema.Types.ObjectId,
          required: true,
          ref: '???' // Ref to what?
      },
      ...
      ...
  });
  </code>
  But I don't know what to put on 'ref'...<br>
  I'd like to avoid adding productAId, productBId fields on ProductChat because there might be many products.<br>
  Any idea how to do it correct?</p>