Depuis la mise à jour de typeorm, je rencontre des problèmes avec leur change de ObjectID en ObjectId.
Je n'ai plus aucun findOne qui fonctionne.
cela me return un id à null.
exemple d'entity :
@Entity('marchands')
export class Marchand {
@ObjectIdColumn() id: ObjectId;
@Column() name: string;
@Column() logo: string;
@Column() status: 0 | 1 | -1;
@Column() email?: string;
@Column() telephone?: string;
@Column() adresse?: string;
@Column() site?: string;
constructor(marchand?: Partial<Marchand>) {
Object.assign(this, marchand);
}
}
exemple de requête :
async getMarchand(id) {
return await this.marchandsRepository.findOne({ where: { id: id } });
}
Pouvez-vous m'aider sil vous plaît à résoudre ce problème qui m'empêche de livrer à gros projet qui était normalement terminé ?