text: 'use strict';
  // Only to be used with validator.js - a correct this value needs to be provided!
  
  function validateCdsPersistenceAnnotation(artifact, artifactName, prop, path) {
    if(artifact.kind === 'entity') {
      // filter for 'table', 'udf', 'calcview' === true
      const TableUdfCv = Object.keys(artifact).filter(p =>
        ['@cds.persistence.table', '@cds.persistence.udf', '@cds.persistence.calcview'].includes(p) && artifact[p]);
      if(TableUdfCv.length > 1)
        this.error(null, path, `Annotations ${TableUdfCv.join(', ')} cannot be used in combination`);
    }
  }
  
  module.exports = validateCdsPersistenceAnnotation;
  