lib/converters/parsedJDLToJDLObject/application_converter.js
/**
 * Checks whether the entity names used in the options are present in the entity names declared for the application.
 * @param {String} applicationName - the application's name
 * @param {Array<JDLUnaryOption|JDLBinaryOption>} entityOptions - the options declared in the application
 * @param {Array<String>} entityNamesInApplication - the entity names declared in the application
 */
Checks whether the entity names used in the options are present in the entity names declared for the application.
@param {String} applicationName - the application's name
@param {Array} entityOptions - the options declared in the application
@param {Array} entityNamesInApplication - the entity names declared in the application
Checks whether the entity names used in the options are present in the entity names declared for the application . @param { String } applicationName - the application ' s name @param { Array } entityOptions - the options declared in the application @param { Array } entityNamesInApplication - the entity names declared in the application
function checkEntityNamesInOptions(applicationName, entityOptions, entityNamesInApplication) {
  const entityNamesInApplicationSet = new Set(entityNamesInApplication);
  entityOptions.forEach(option => {
    const entityNamesForTheOption = option.resolveEntityNames(entityNamesInApplication);
    entityNamesForTheOption.forEach(entityNameForTheOption => {
      if (!entityNamesInApplicationSet.has(entityNameForTheOption)) {
        throw new Error(
          `The entity ${entityNameForTheOption} in the ${option.name} option isn't declared in ${applicationName}'s entity list.`
        );
      }
    });
  });
}
function checkEntityNamesInOptions ( applicationName , entityOptions , entityNamesInApplication ) { const entityNamesInApplicationSet = new Set ( entityNamesInApplication ) ; entityOptions . forEach ( option => { const entityNamesForTheOption = option . resolveEntityNames ( entityNamesInApplication ) ; entityNamesForTheOption . forEach ( entityNameForTheOption => { if ( ! entityNamesInApplicationSet . has ( entityNameForTheOption ) ) { throw new Error ( ` ${ entityNameForTheOption } ${ option . name } ${ applicationName } ` ) ; } } ) ; } ) ; }
Checks whether the entity names used in the options are present in the entity names declared for the application.
Checks whether the entity names used in the options are present in the entity names declared for the application .