dist/cjs/src/decorators/model-meta/relationship-store.js
function getRelationships(model) {
    const modelName = model.constructor.name;
    const properties = typed_conversions_1.hashToArray(exports.relationshipsByModel[modelName], "property") || [];
    let parent = Object.getPrototypeOf(model.constructor);
    while (parent.name) {
        const subClass = new parent();
        const subClassName = subClass.constructor.name;
        properties.push(...typed_conversions_1.hashToArray(exports.relationshipsByModel[subClassName], "property"));
        parent = Object.getPrototypeOf(subClass.constructor);
    }
    return properties;
}
function getRelationships(model) {
    const modelName = model.constructor.name;
    const properties = typed_conversions_1.hashToArray(exports.relationshipsByModel[modelName], "property") || [];
    let parent = Object.getPrototypeOf(model.constructor);
    while (parent.name) {
        const subClass = new parent();
        const subClassName = subClass.constructor.name;
        properties.push(...typed_conversions_1.hashToArray(exports.relationshipsByModel[subClassName], "property"));
        parent = Object.getPrototypeOf(subClass.constructor);
    }
    return properties;
}
function getRelationships ( model ) { const modelName = model . constructor . name ; const properties = typed_conversions_1 . hashToArray ( exports . relationshipsByModel [ modelName ] , "property" ) || [ ] ; let parent = Object . getPrototypeOf ( model . constructor ) ; while ( parent . name ) { const subClass = new parent ( ) ; const subClassName = subClass . constructor . name ; properties . push ( ... typed_conversions_1 . hashToArray ( exports . relationshipsByModel [ subClassName ] , "property" ) ) ; parent = Object . getPrototypeOf ( subClass . constructor ) ; } return properties ; }
Gets all the relationships for a given model
Gets all the relationships for a given model