Clientes
This commit is contained in:
parent
f2ef5d2267
commit
88f5062c03
@ -189,13 +189,12 @@ export class CustomerRepository
|
||||
deleted_at: null,
|
||||
};
|
||||
|
||||
// Reemplazar findAndCountAll por findAll + count (más control y mejor rendimiento)
|
||||
/*const { rows, count } = await CustomerModel.findAndCountAll({
|
||||
const { rows, count } = await CustomerModel.findAndCountAll({
|
||||
...query,
|
||||
transaction,
|
||||
});*/
|
||||
});
|
||||
|
||||
const [rows, count] = await Promise.all([
|
||||
/*const [rows, count] = await Promise.all([
|
||||
CustomerModel.findAll({
|
||||
...CustomerModel,
|
||||
transaction,
|
||||
@ -205,7 +204,7 @@ export class CustomerRepository
|
||||
distinct: true, // evita duplicados por LEFT JOIN
|
||||
transaction,
|
||||
}),
|
||||
]);
|
||||
]);*/
|
||||
|
||||
return mapper.mapToDTOCollection(rows, count);
|
||||
} catch (err: unknown) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user