Function: isCrossSource()
function isCrossSource(fromNamespace, rel): boolean;
Defined in: packages/ir/src/helpers.ts:218
A relation is cross-source when its target namespace is anything other than the entity's own namespace — including the "absent" (empty) namespace, which v1 drivers treat as an unresolved cross-source reference.
Parameters
| Parameter | Type |
|---|---|
fromNamespace | string |
rel | { backRelation?: string; cardinality: "one" | "many"; fkFields?: string[]; name: string; onDelete?: "cascade" | "restrict" | "setNull" | "setDefault" | "noAction"; onUpdate?: "cascade" | "restrict" | "setNull" | "setDefault" | "noAction"; optional: boolean; owning: boolean; references?: string[]; target: { entity: string; namespace: string; }; } |
rel.backRelation? | string |
rel.cardinality | "one" | "many" |
rel.fkFields? | string[] |
rel.name | string |
rel.onDelete? | "cascade" | "restrict" | "setNull" | "setDefault" | "noAction" |
rel.onUpdate? | "cascade" | "restrict" | "setNull" | "setDefault" | "noAction" |
rel.optional | boolean |
rel.owning | boolean |
rel.references? | string[] |
rel.target | { entity: string; namespace: string; } |
rel.target.entity | string |
rel.target.namespace | string |
Returns
boolean