Can a link that's effectively many-to-many be implemented by a many-to-one link that uses an array of pks to link?

can a link that’s effectively many-to-many be implemented by a many-to-one link that uses an array of pks to link? Example: a Route has a col that is an array of Road Segment pks and links the two objects via many-to-one. One Road Segment can have many Routes bc a road segment can be included in multiple Routes . In this view it shoes that one Route has only one Road segment but I assume in reality a Route will link to multiple Road segments via the pk array column. Do I have that right?

Evidently–the answer is YES. You can use a one-to-many with pk array to create an effective many-to-many link :slight_smile:

Note that this link does NOT work as expected in Functions:

Expected at most one linked object. Check if the cardinality of the object in the link should be set to ‘MANY’ instead or if there are erroneous links in the data…
Error Parameters: {
“objectLocator”: “[rid: ri.phonograph2-objects.main.object.ac5b5c51-5f67-4e5e-84aa-b2c6b7642eda, type: salmketb.ngds-route, primaryKey: {"primary_key":"31e8a527-a9b1-43fc-9fba-fa65992e0ea8"}]”,
“relationId”: “salmketb.ngds-road-segment-ngds-route1”,
“relationSide”: “TARGET”,
“actualLength”: “4”
}
SafeError: Expected at most one linked object. Check if the cardinality of the object in the link should be set to ‘MANY’ instead or if there are erroneous links in the data.
at t [as constructor] (FunctionsIsolateRuntimePackage:2:1310795)
at new t (FunctionsIsolateRuntimePackage:2:540085)
at Object.t.expectedOnlySingleLink (FunctionsIsolateRuntimePackage:2:1191649)
at t.DefaultObjectStorageProvider.assertSingleLink (FunctionsIsolateRuntimePackage:2:1187902)
at FunctionsIsolateRuntimePackage:2:1186939
at t.ExternalRequestTracer.sync (FunctionsIsolateRuntimePackage:2:1307252)
at Object.get (FunctionsIsolateRuntimePackage:2:1186761)
at Object.get (FunctionsIsolateRuntimePackage:2:1113674)
at Object.get (FunctionsIsolateRuntimePackage:2:1115556)
at Object.get (FunctionsIsolateRuntimePackage:2:1118956)