src/modules-ext/modules-data-sources/mongodb/pai-entity-to-mongo-convertor.js
function getMongoModelForEntity(entity) {
	
	const entityName = entity.setEntityName();
	
	if(!models.hasOwnProperty(entity.setEntityName()))
	{
		models[entityName] = convertPAIEntityToMongoSchema(entity);
		
		PAILogger.info("MongoDB Model just created: " + entityName);
	}
	
	return models[entityName];
}
function getMongoModelForEntity(entity) {
	
	const entityName = entity.setEntityName();
	
	if(!models.hasOwnProperty(entity.setEntityName()))
	{
		models[entityName] = convertPAIEntityToMongoSchema(entity);
		
		PAILogger.info("MongoDB Model just created: " + entityName);
	}
	
	return models[entityName];
}
function getMongoModelForEntity ( entity ) { const entityName = entity . setEntityName ( ) ; if ( ! models . hasOwnProperty ( entity . setEntityName ( ) ) ) { models [ entityName ] = convertPAIEntityToMongoSchema ( entity ) ; PAILogger . info ( "MongoDB Model just created: " + entityName ) ; } return models [ entityName ] ; }
Get MongoDB Model
@param entity
@return {Model}
Get MongoDB Model