diff --git a/server/src/utils/database.ts b/server/src/utils/database.ts index 45fb6c6daef21..55e4fcb0e555b 100644 --- a/server/src/utils/database.ts +++ b/server/src/utils/database.ts @@ -136,6 +136,8 @@ export function searchAssetBuilder( .groupBy(`faces."assetId"`) .having(`COUNT(DISTINCT faces."personId") = :personCount`, { personCount: personIds.length }); builder.addCommonTableExpression(cte, 'face_ids').innerJoin('face_ids', 'a', 'a."assetId" = asset.id'); + + builder.getQuery(); // typeorm mixes up parameters without this (੭ °ཀ°)੭ } if (withStacked) {