MCPcopy Create free account
hub / github.com/DanWahlin/CustomerManagerStandard / getAssociation

Function getAssociation

CustomerManager/Scripts/breeze.debug.js:7252–7263  ·  view source on GitHub ↗
(csdlNavProperty, schema)

Source from the content-addressed store, hash-verified

7250 // -> association
7251
7252 function getAssociation(csdlNavProperty, schema) {
7253 var assocName = parseTypeName(csdlNavProperty.relationship, schema).shortTypeName;
7254 var assocs = schema.association;
7255 if (!assocs) return null;
7256 if (!Array.isArray(assocs)) {
7257 assocs = [assocs];
7258 }
7259 var association = __arrayFirst(assocs, function (assoc) {
7260 return assoc.name === assocName;
7261 });
7262 return association;
7263 }
7264
7265 // schema is only needed for navProperty type name
7266 function parseTypeName(entityTypeName, schema) {

Callers 1

parseCsdlNavPropertyFunction · 0.85

Calls 2

parseTypeNameFunction · 0.85
__arrayFirstFunction · 0.85

Tested by

no test coverage detected