## BaseModel.prototype.missingRelations

Check missing relations based on keys array.
@param  {Array} keys array of strings
@returns {Array} keys of missing relations
550769
function(keys) {
    var missingRelations = [];
    var relationKeys = this.relationDefinitions ? Object.keys(this.relationDefinitions) : [];
    _.each(keys, function(key) {
      var isRelation = relationKeys.indexOf(key) > -1;
      if (isRelation && _.isUndefined(this.get(key))) {
        missingRelations.push(key);
      }
    }, this);
    return _.uniq(missingRelations);
  }
436783
function getSeparators (key) {
  let pattern = Object.keys(separators).find(p => minimatch(key, p))
  const seps = separators[pattern] || defaultSeparators
  return seps.slice() // return a copy of the array
}
874711
def detect_missing_relations(self, obj, exc):
        
        missing = defaultdict(set)
        for name, err in exc.error_dict.items():
            # check if it was a relationship that doesnt exist locally
            pattern = r".+ with id (\d+) does not exist.+"
            m = re.match(pattern, str(err))
            if m:
                field = obj._meta.get_field(name)
                res = self.get_resource(field.related_model)
                missing[res].add(int(m.group(1)))
        return missing
407182
public Set<K> checkAllPresent(final Iterable<? extends K> keys) {
    Set<K> _keysToLoad = new HashSet<K>();
    for (K k : keys) {
      Entry<K,V> e = lookupEntryNoHitRecord(k);
      if (e == null || !e.hasFreshData(clock)) {
        _keysToLoad.add(k);
      }
    }
    return _keysToLoad;
  }
397438
function getKeys(compositeKey) {
  if (typeof compositeKey === 'string') {
    // else assume string and split around dots
    let keyList = keyMap[compositeKey];
    if (!keyList) {
      keyList = compositeKey.split('.');
      keyMap[compositeKey] = keyList;
    }
    return keyList;
  }
  // Wrap in array if needed
  return Array.isArray(compositeKey) ? compositeKey : [compositeKey];
}
297421
public static int[] mapQuoteKeys(String keys) {
        if(keys != null && keys.length() > 1)
            return mapKeys(keys.substring(1));
        else
            return null;
    }
1080292
@SafeVarargs
    public final MigrateArgs<K> keys(K... keys) {

        LettuceAssert.notEmpty(keys, "Keys must not be empty");

        this.keys.addAll(Arrays.asList(keys));
        return this;
    }
579420
public boolean hasProperties(Set<PropertyKey> keys) {
        for (PropertyKey key : keys) {
            if (null == getProperty(key.m_key)) {
                return false;
            }
        }
        
        return true;
    }
1025718
public static void validateAllNotEmpty(Props props, String... keys) {
    for (String key : keys) {
      props.getString(key);
    }
  }
101554
function omit(keys, object){
  var ret = {};

  for (var item in object) {
    ret[item] = object[item];
  }

  for (var i = 0; i < keys.length; i++) {
    delete ret[keys[i]];
  }
  return ret;
}
1184165
public RequestLimitRule matchingKeys(String... keys) {
        Set<String> keySet = keys.length > 0 ? new HashSet<>(Arrays.asList(keys)) : null;
        return matchingKeys(keySet);
    }
794652
function initRelations (args) {
    // create map of relations
    this.relations = {}
    // get relations from args
    var relations = requireValidOptionalObject(args.relations)
    // validate and add relations
    _.each(relations, (relation, relatedModelName) => {
        this.relations[relatedModelName] = relation
    })
}
800304
protected function hasOneOrManyDeepFromRelations(array $relations)
    {
        if (is_array($relations[0])) {
            $relations = $relations[0];
        }

        $related = null;
        $through = [];
        $foreignKeys = [];
        $localKeys = [];

        foreach ($relations as $i => $relation) {
            $method = $this->hasOneOrManyDeepRelationMethod($relation);

            [$through, $foreignKeys, $localKeys] = $this->$method($relation, $through, $foreignKeys, $localKeys);

            if ($i === count($relations) - 1) {
                $related = get_class($relation->getRelated());
            } else {
                $through[] = get_class($relation->getRelated());
            }
        }

        return [$related, $through, $foreignKeys, $localKeys];
    }
1136914
public synchronized Filter addKeys(String... keys) {
    for(String key : keys) {
      this.keys.add(key);
    }
    return this;
  }
1110128
function $keys(params) {
    if (params == null) {
        return params;
    }
    if (params != null && typeof params === 'object') {
        return Object.keys(params);
    }
    throw new Error('$keys expects object');
}
135228
protected function getRelations($keys, $constraint = null)
	{
		if (isset($constraint))
		{
			call_user_func_array($constraint, array($this->related));
		}

		return $this->related->whereIn($this->relatedKey, array_unique($keys));
	}
207330
function processAllRelations(callback) {
    var i, modelName, relation, relations, result = [];
    for (modelName in relationships) {
        if (relationships.hasOwnProperty(modelName)) {
            relations = relationships[modelName];
            for (i = 0; i < relations.length; i = i + 1) {
                relation = relations[i];
                result.push(callback(modelName, relation.type, relation.model, relation.details));
            }
        }
    }
    return result;
}