Skip to content

Commit

Permalink
Merge branch 'master' into bugfix/ilike-mongoose
Browse files Browse the repository at this point in the history
  • Loading branch information
simnado authored Jan 13, 2025
2 parents 2c44fd3 + 14175fb commit 27365c2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@ export abstract class ReferenceQueryService<Entity extends Document> {
const refs = entityRelations.filter((er) => {
return referenceIds.some((rid) => {
const oneOrManyIds = er[refFieldMap.foreignField as keyof Relation]
const ids = (Array.isArray(oneOrManyIds) ? oneOrManyIds : [oneOrManyIds]) as Types.ObjectId[]
return ids.some((id) => id.equals(rid as Types.ObjectId))
const ids = Array.isArray(oneOrManyIds) ? oneOrManyIds : [oneOrManyIds]
return ids.some((id) => String(id) === String(rid))
})
})
results.set(dto, await assembler.convertToDTOs(refs))
Expand Down

0 comments on commit 27365c2

Please sign in to comment.