Можно использовать калбек во where:
queryBuilder.where("orders.status = :status", {
status: query.status,
}).andWhere(
new Brackets((qb) => {
qb.orWhere("orders.title LIKE :title", {
title: `%${query.name}%`,
}).orWhere("orders.description LIKE :description", {
description: `%${query.name}%`,
});
})
);
Либо так:
queryBuilder.where(
"orders.status = :status AND (orders.title LIKE :title OR orders.description LIKE :description)",
{
status: query.status,
title: `%${query.name}%`,
description: `%${query.name}%`,
}
);