code: function getSortedRefPaths (reverse) {
    let refs = []
  
    if (this.schema.refs) {
      for (const key in this.schema.refs) {
        if (this.schema.refs.hasOwnProperty(key)) {
          refs.push(this.schema.refs[key].path)
        }
      }
  
      if (refs.length > 0) {
        refs = _.sortBy(refs, 'length')
        if (reverse) {
          refs.reverse()
        }
      }
    }
  
    return refs
  }
docs: /*!
  Has to be called with a context
  Can work against an instance or a Model class as static function