|
|
@ -1010,7 +1010,7 @@ export async function extractAndGenerateManyToManyRelations( |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// todo: impl better method to identify m2m relation
|
|
|
|
// todo: impl better method to identify m2m relation
|
|
|
|
if (belongsToCols?.length === 2 && normalColumns.length < 5) { |
|
|
|
if (belongsToCols?.length === 2 && normalColumns.length < 5 && assocModel.primaryKeys.length === 2) { |
|
|
|
const modelA = await belongsToCols[0].colOptions.getRelatedTable(); |
|
|
|
const modelA = await belongsToCols[0].colOptions.getRelatedTable(); |
|
|
|
const modelB = await belongsToCols[1].colOptions.getRelatedTable(); |
|
|
|
const modelB = await belongsToCols[1].colOptions.getRelatedTable(); |
|
|
|
|
|
|
|
|
|
|
|