mirror of
https://github.com/strapi/strapi.git
synced 2025-08-10 17:58:07 +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)) {
|
if (['manyToMany', 'manyWay'].includes(assoc.nature)) {
|
||||||
const joinTableAlias = generateAlias(assoc.tableCollectionName);
|
const joinTableAlias = generateAlias(assoc.tableCollectionName);
|
||||||
|
|
||||||
let originColumnNameInJoinTable = `${joinTableAlias}.`;
|
let originColumnNameInJoinTable;
|
||||||
if (assoc.nature === 'manyToMany') {
|
if (assoc.nature === 'manyToMany') {
|
||||||
originColumnNameInJoinTable += `${singular(
|
originColumnNameInJoinTable = `${joinTableAlias}.${singular(
|
||||||
destinationInfo.model.attributes[assoc.via].attribute
|
destinationInfo.model.attributes[assoc.via].attribute
|
||||||
)}_${destinationInfo.model.attributes[assoc.via].column}`;
|
)}_${destinationInfo.model.attributes[assoc.via].column}`;
|
||||||
} else if (assoc.nature === 'manyWay') {
|
} else if (assoc.nature === 'manyWay') {
|
||||||
originColumnNameInJoinTable += `${singular(originInfo.model.collectionName)}_${
|
originColumnNameInJoinTable = `${joinTableAlias}.${singular(
|
||||||
originInfo.model.primaryKey
|
originInfo.model.collectionName
|
||||||
}`;
|
)}_${originInfo.model.primaryKey}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
qb.leftJoin(
|
qb.leftJoin(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user