Closed vimox-shah closed 3 years ago
Please, use our Discord channel (support) for such questions. We are using GitHub to track bugs, feature requests, and potential improvements.
Please, use our Discord channel (support) for such questions. We are using GitHub to track bugs, feature requests, and potential improvements.
Hey I have already posted the same question in your discord channel. But didn't get any response.
How can I define multiple subdocument types to a single field in nestjs mongoose? e.g
export class Tracking extends BaseSchema { @Prop({ required: true, index: true }) referenceNumber: string;
@Prop({ type: A.schema | B.schema | C.schema}) data: A | B | C } here A, B, and C are different subdocument schema. but I will have data of type A, B or C while inserting the record. how can I achieve this.?
I can not define type like type: A.schema | B.schema | C.schema this. and even I can't define like data: A | B | C this also..It is giving error.