mirror of
https://github.com/strapi/strapi.git
synced 2025-08-07 08:16:35 +00:00
lint
Signed-off-by: Pierre Noël <pierre.noel@strapi.io>
This commit is contained in:
parent
ff1fbcdfba
commit
0c7029c2b1
@ -82,15 +82,15 @@ const buildJoinsAndFilter = (qb, model, whereClauses) => {
|
||||
if (['manyToMany', 'manyWay'].includes(assoc.nature)) {
|
||||
const joinTableAlias = generateAlias(assoc.tableCollectionName);
|
||||
|
||||
let originColumnNameInJoinTable = `${joinTableAlias}.`;
|
||||
let originColumnNameInJoinTable;
|
||||
if (assoc.nature === 'manyToMany') {
|
||||
originColumnNameInJoinTable += `${singular(
|
||||
originColumnNameInJoinTable = `${joinTableAlias}.${singular(
|
||||
destinationInfo.model.attributes[assoc.via].attribute
|
||||
)}_${destinationInfo.model.attributes[assoc.via].column}`;
|
||||
} else if (assoc.nature === 'manyWay') {
|
||||
originColumnNameInJoinTable += `${singular(originInfo.model.collectionName)}_${
|
||||
originInfo.model.primaryKey
|
||||
}`;
|
||||
originColumnNameInJoinTable = `${joinTableAlias}.${singular(
|
||||
originInfo.model.collectionName
|
||||
)}_${originInfo.model.primaryKey}`;
|
||||
}
|
||||
|
||||
qb.leftJoin(
|
||||
|
Loading…
x
Reference in New Issue
Block a user