lib/config-parser.js
function resolvePrimaryKey(attrNode, context) {
    const errorContext = context.errorContext;
    context.errorContext = ' in primaryKey' + errorContext;

    const neededDataSources = [];

    Object.keys(attrNode.dataSources).forEach(dataSourceName => {
        if (attrNode.dataSources[dataSourceName].joinParentKey) return;
        neededDataSources.push(dataSourceName);
    });

    attrNode.resolvedPrimaryKey = resolveKey(
        attrNode.primaryKey,
        attrNode,
        {
            neededDataSources,
            allowMultiValued: false
        },
        context
    );

    // enable "equal" filter:
    attrNode.primaryKey.forEach(primaryKeyAttrPath => {
        const primaryKeyAttrNode = getLocalAttribute(primaryKeyAttrPath, attrNode, context);

        if (!primaryKeyAttrNode.filter && attrNode.primaryKey.length === 1) {
            if (!primaryKeyAttrNode.hidden) {
                primaryKeyAttrNode.filter = ['equal'];
            }
        }
    });

    context.errorContext = errorContext;
}
function resolvePrimaryKey(attrNode, context) {
    const errorContext = context.errorContext;
    context.errorContext = ' in primaryKey' + errorContext;

    const neededDataSources = [];

    Object.keys(attrNode.dataSources).forEach(dataSourceName => {
        if (attrNode.dataSources[dataSourceName].joinParentKey) return;
        neededDataSources.push(dataSourceName);
    });

    attrNode.resolvedPrimaryKey = resolveKey(
        attrNode.primaryKey,
        attrNode,
        {
            neededDataSources,
            allowMultiValued: false
        },
        context
    );

    // enable "equal" filter:
    attrNode.primaryKey.forEach(primaryKeyAttrPath => {
        const primaryKeyAttrNode = getLocalAttribute(primaryKeyAttrPath, attrNode, context);

        if (!primaryKeyAttrNode.filter && attrNode.primaryKey.length === 1) {
            if (!primaryKeyAttrNode.hidden) {
                primaryKeyAttrNode.filter = ['equal'];
            }
        }
    });

    context.errorContext = errorContext;
}
function resolvePrimaryKey ( attrNode , context ) { const errorContext = context . errorContext ; context . errorContext = ' in primaryKey' + errorContext ; const neededDataSources = [ ] ; Object . keys ( attrNode . dataSources ) . forEach ( dataSourceName => { if ( attrNode . dataSources [ dataSourceName ] . joinParentKey ) return ; neededDataSources . push ( dataSourceName ) ; } ) ; attrNode . resolvedPrimaryKey = resolveKey ( attrNode . primaryKey , attrNode , { neededDataSources , allowMultiValued : false } , context ) ; // enable "equal" filter: attrNode . primaryKey . forEach ( primaryKeyAttrPath => { const primaryKeyAttrNode = getLocalAttribute ( primaryKeyAttrPath , attrNode , context ) ; if ( ! primaryKeyAttrNode . filter && attrNode . primaryKey . length === 1 ) { if ( ! primaryKeyAttrNode . hidden ) { primaryKeyAttrNode . filter = [ 'equal' ] ; } } } ) ; context . errorContext = errorContext ; }
Resolve primaryKey per DataSource and fail if not all DataSources have the complete primaryKey.
Enable "equal" filter for visible non-composite primary keys by default.

@private
Resolve primaryKey per DataSource and fail if not all DataSources have the complete primaryKey . Enable equal filter for visible non - composite primary keys by default .