Open hanza93 opened 2 years ago
@doug-martin sorry but I really stuck on this
@doug-martin sorry but I really stuck on this
This library doesn't work with mongoose v6. You need to use mongoose v5.
Or try the Typegoose version. Also the updated fork (look through the issues). This package has been dead for a while.
Scott
already using the mongoose v5 @DedWatson :(
already using the mongoose v5 @DedWatson :(
You made a mistake. Look at this https://doug-martin.github.io/nestjs-query/docs/persistence/mongoose/relations
@ObjectType('JobCard')
@KeySet(['id'])
@Relation('parts', () => JobCardPartDto, { disableRemove: true })
export class JobCardDto {
@IDField(() => ID)
id!: string;
}
Have you read the Contributing Guidelines?
Yes.
Hey, before the question here is a context: I'm using mongoose and I have 2 models (JobCard, Part) where JobCard has multiple Parts with different statuses for each Part, so I decided to go with subdocument, and here the problem started.
JobCard schema
JobCardPart schema
and the DTOs are as follows
JobCard Dto
JobCardPart Dto
Part Dto
when I try to run this query
I'm getting this error
ID cannot represent value: { type: \"Buffer\", data: [Array] }
.Thanks in advance.