lib/db/cortex.php
public function contains($val,$key='_id') {
		$rel_ids = $this->getAll($key, true);
		if ($val instanceof Cursor)
			$val = $val->{$key};
		return in_array($val,$rel_ids);
	}
public function contains($val,$key='_id') {
		$rel_ids = $this->getAll($key, true);
		if ($val instanceof Cursor)
			$val = $val->{$key};
		return in_array($val,$rel_ids);
	}
public function contains ( $ val , $ key = '_id' ) { $ rel_ids = $ this -> getAll ( $ key , true ) ; if ( $ val instanceof Cursor ) $ val = $ val -> { $ key } ; return in_array ( $ val , $ rel_ids ) ; }
check if the collection contains a record with the given key-val set
@param mixed $val
@param string $key
@return bool
check if the collection contains a record with the given key - val set