You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
export class First {
@Prop()
first: string;
}
export class Second {
@Prop()
second: string;
}
export class Last extends IntersectionType(First, Second) {
@Prop()
last: string;
}
The problem is that properties like first and second are ignored.
The classes from @nestjs/mapped-types only carry forward metadata declared by class-transformer and class-validator package based decorators. There is no mention in the docs that you can use it for @nestjs/mongoose class based schemas too.
I don't feel this is a bug. You'll just have to make amends to your code and follow a different hierarchal approach.
Is there an existing issue for this?
Current behavior
When I use IntersectionType:
The problem is that properties like first and second are ignored.
output:
Minimum reproduction code
https://github.com/nestjs/mongoose
Steps to reproduce
No response
Expected behavior
output:
Package version
10.0.4
mongoose version
8.0.2
NestJS version
10.3.3
Node.js version
21.7
In which operating systems have you tested?
Other
No response
The text was updated successfully, but these errors were encountered: