@hops-ops/distributed 4.3.0 → 4.4.0
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.
|
@@ -455,19 +455,23 @@ export function relationshipKeyMapping(value, dependencies, path) {
|
|
|
455
455
|
value: Object.freeze({ kind: 'direct', local, remote })
|
|
456
456
|
};
|
|
457
457
|
}
|
|
458
|
+
const sourceForeignKey = uniqueStringList(value.sourceForeignKey);
|
|
459
|
+
const targetForeignKey = uniqueStringList(value.targetForeignKey);
|
|
458
460
|
if (value.kind === 'through' &&
|
|
459
461
|
isName(value.table) &&
|
|
460
462
|
dependencies.includes(value.table) &&
|
|
461
|
-
|
|
462
|
-
|
|
463
|
+
sourceForeignKey !== undefined &&
|
|
464
|
+
targetForeignKey !== undefined &&
|
|
465
|
+
sourceForeignKey.length === local.length &&
|
|
466
|
+
targetForeignKey.length === remote.length) {
|
|
463
467
|
return {
|
|
464
468
|
value: Object.freeze({
|
|
465
469
|
kind: 'through',
|
|
466
470
|
local,
|
|
467
471
|
remote,
|
|
468
472
|
table: value.table,
|
|
469
|
-
sourceForeignKey
|
|
470
|
-
targetForeignKey
|
|
473
|
+
sourceForeignKey,
|
|
474
|
+
targetForeignKey
|
|
471
475
|
})
|
|
472
476
|
};
|
|
473
477
|
}
|
package/dist/replica/types.d.ts
CHANGED
|
@@ -173,8 +173,8 @@ export type ReplicaRelationshipKeyMapping = {
|
|
|
173
173
|
readonly local: readonly string[];
|
|
174
174
|
readonly remote: readonly string[];
|
|
175
175
|
readonly table: string;
|
|
176
|
-
readonly sourceForeignKey: string;
|
|
177
|
-
readonly targetForeignKey: string;
|
|
176
|
+
readonly sourceForeignKey: readonly string[];
|
|
177
|
+
readonly targetForeignKey: readonly string[];
|
|
178
178
|
} | {
|
|
179
179
|
readonly kind: 'through_opaque';
|
|
180
180
|
readonly local: readonly string[];
|
package/package.json
CHANGED