@technicity/data-service-generator 0.23.0-next.5 → 0.23.0-next.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1705,7 +1705,7 @@ const getRelationsManyToOne = (0, memoize_1.default)(async function getRelations
|
|
|
1705
1705
|
nullable: tableMeta.find((m) => m.Field === v.t1Field)?.Null === "YES"
|
|
1706
1706
|
};
|
|
1707
1707
|
})));
|
|
1708
|
-
return _.sortBy((x) => x.referencedTable, xs);
|
|
1708
|
+
return _.sortBy([(x) => x.referencedTable, (x) => x.referencedKey, (x) => x.foreignKey], xs);
|
|
1709
1709
|
}, (table) => getCtx().runId + ":" + table);
|
|
1710
1710
|
// `to` relations
|
|
1711
1711
|
const getRelationsOneToMany = (0, memoize_1.default)(async function getRelationsOneToMany(table) {
|
|
@@ -1749,7 +1749,7 @@ const getRelationsOneToMany = (0, memoize_1.default)(async function getRelations
|
|
|
1749
1749
|
nullable: false
|
|
1750
1750
|
};
|
|
1751
1751
|
})));
|
|
1752
|
-
return _.sortBy((x) => x.referencedKey,
|
|
1752
|
+
return _.sortBy([(x) => x.referencedTable, (x) => x.referencedKey, (x) => x.foreignKey], xs);
|
|
1753
1753
|
}, (table) => getCtx().runId + ":" + table);
|
|
1754
1754
|
async function getPrimaryColumn(table) {
|
|
1755
1755
|
const tableMeta = await getTableMeta(table);
|