checkIntegrity() {
    const problems = [];
    this.find().forEach((doc) => {
      if (doc.role !== ROLE.VOLUNTEER) {
        problems.push(`VolunteerProfile instance does not have ROLE.VOLUNTEER: ${doc}`);
      }
    });
    return problems;
  }
/**
   * Returns an array of strings, each one representing an integrity problem with this collection.
   * Returns an empty array if no problems were found.
   * Checks the profile common fields and the role..
   * @returns {Array} A (possibly empty) array of strings indicating integrity issues.
   */
Returns an array of strings, each one representing an integrity problem with this collection.
Returns an empty array if no problems were found.
Checks the profile common fields and the role
@returns {Array} A (possibly empty) array of strings indicating integrity issues.
Returns an array of strings each one representing an integrity problem with this collection . Returns an empty array if no problems were found . Checks the profile common fields and the role @returns { Array } A ( possibly empty ) array of strings indicating integrity issues .
checkIntegrity() {
    const problems = [];
    this.find().forEach((doc) => {
      if (doc.role !== ROLE.VOLUNTEER) {
        problems.push(`VolunteerProfile instance does not have ROLE.VOLUNTEER: ${doc}`);
      }
    });
    return problems;
  }
checkIntegrity ( ) { const problems = [ ] ; this . find ( ) . forEach ( ( doc ) => { if ( doc . role !== ROLE . VOLUNTEER ) { problems . push ( ` ${ doc } ` ) ; } } ) ; return problems ; }
Returns an array of strings, each one representing an integrity problem with this collection.
Returns an array of strings each one representing an integrity problem with this collection .