fix(person): correct SQL syntax in person name search query

pull/27336/head
Hugo de Sousa Pereira 2026-05-09 20:01:36 +01:00
parent 65e603874f
commit eceaa3b68d
2 changed files with 2 additions and 2 deletions

View File

@ -225,7 +225,7 @@ where
and "asset"."deletedAt" is null
)
)
and f_unaccent ("person"."name") %>> f_unaccent ($3)
and f_unaccent ("person"."name") %> f_unaccent ($3)
order by
f_unaccent ("person"."name") <->>> f_unaccent ($4)
limit

View File

@ -336,7 +336,7 @@ export class PersonRepository {
.selectAll('person')
.where('person.ownerId', '=', userId)
.where(hasFace)
.where(() => sql`f_unaccent("person"."name") %>> f_unaccent(${personName})`)
.where(() => sql`f_unaccent("person"."name") %> f_unaccent(${personName})`)
.orderBy(sql`f_unaccent("person"."name") <->>> f_unaccent(${personName})`)
.limit(100)
.$if(!withHidden, (qb) => qb.where('person.isHidden', '=', false))