If the primary key is not null, return the hashcode of the
primary key. Otherwise, return the hash code of the object.

@return int Hashcode
354414
public function hashCode()
    {
        $validPk = null !== $this->getId();

        $validPrimaryKeyFKs = 0;
        $primaryKeyFKs = [];

        if ($validPk) {
            return crc32(json_encode($this->getPrimaryKey(), JSON_UNESCAPED_UNICODE));
        } elseif ($validPrimaryKeyFKs) {
            return crc32(json_encode($primaryKeyFKs, JSON_UNESCAPED_UNICODE));
        }

        return spl_object_hash($this);
    }
432598
public function getPrimaryKeyValue()
    {
        //
        $key = static::getPrimaryKey();

        //
        return $key
            && isset($this->{$key})
            ? $this->{$key}
            : null;
    }
10283
public function key()
	{
		$keys	= array_keys( $this->pairs );
		return $this->position < $this->count() ? $keys[$this->position] : NULL;
	}
1167231
function GetPrimaryKeyName()
    {
        $fms = $this->_phreezer->GetFieldMaps(get_class($this));
        foreach ($fms as $fm)
        {
            if ($fm->IsPrimaryKey)
            {
				return $fm->PropertyName;
			}
        }

		/*
		print "<pre>";
		$this->Data = "";
		$this->_phreezer = null;
		$this->_cache = null;
		print_r($this);

		print_r($fms);
		die();
		*/

		throw new Exception("No Primary Key found for " . get_class($this));
    }
460177
private int hashCodeImpl() {
		int result = 0;
		for (Map.Entry<String, Object> e : memberValues.entrySet()) {
			result += (127 * e.getKey().hashCode())
					^ memberValueHashCode(e.getValue());
		}
		return result;
	}
845447
public function getPrimaryKey(): ?Index {
		// if the table is not persistent so far, it is possible that it doesn't have a Primary Key
		$primaryKey = null;
		foreach ($this->getIndexes() as $index) {
			if ($index->getType() == IndexType::PRIMARY) {
				if (null === $this->primaryKey) {
					$primaryKey = $index;
				} else {
					throw new MetaRuntimeException('Duplicate primary key in table "' . $this->getName() . '"');
				}
			}
		}
		
		return $primaryKey;
	}
219644
public function getKeyValue()
    {
        if (array_key_exists($this->primary_key, $this->original)) {
            return $this->original[$this->primary_key];
        }

        return null;
    }
719435
public static function primary_key()
	{
		$id_only = static::get_primary_key_id_only_status();
		$pk_status = static::get_primary_key_status();

		if ($id_only)
		{
			return static::getNonTimestampPks();
		}

		if ($pk_status && ! $id_only)
		{
			return static::$_primary_key;
		}

		return array();
	}
660230
public function getHashCode()
    {
        return md5(
            $this->conditionType .
            $this->operatorType .
            implode(';', $this->condition) .
            $this->style->getHashCode() .
            __CLASS__
        );
    }
903561
public function getPrimaryKeyName()
    {
        if ($this->primaryKey == null) {
            $model = $this->getModel();
            $this->primaryKey = $model->getPrimaryKeyName();
        }
        return $this->primaryKey;
    }
1008673
public function getHash()
	{
		$h = hash_init($this->_hashAlgo);
		foreach($this->_keys as &$v)
			hash_update($h, $v);
		$r = hash_final($h, true);
		unset($h);
		return $r;
	}
1258897
protected function getPrimaryKeyValue()
    {

        // initialize the array for the PK values
        $pk = array();

        // prepare the array with the PK values
        foreach ($this->getPrimaryKeyColumnName() as $columName) {
            $pk[] = $this->getValue($columName);
        }

        // return the array with the PK values
        return $pk;
    }
571093
public function hashCode()
    {
        $validPk = null !== $this->getStructureNodeId() &&
            null !== $this->getParentId();

        $validPrimaryKeyFKs = 2;
        $primaryKeyFKs = [];

        //relation structure_node_parent_fk_node to table kk_trixionary_structure_node
        if ($this->aStructureNodeRelatedByStructureNodeId && $hash = spl_object_hash($this->aStructureNodeRelatedByStructureNodeId)) {
            $primaryKeyFKs[] = $hash;
        } else {
            $validPrimaryKeyFKs = false;
        }

        //relation structure_node_parent_fk_parent to table kk_trixionary_structure_node
        if ($this->aStructureNodeRelatedByParentId && $hash = spl_object_hash($this->aStructureNodeRelatedByParentId)) {
            $primaryKeyFKs[] = $hash;
        } else {
            $validPrimaryKeyFKs = false;
        }

        if ($validPk) {
            return crc32(json_encode($this->getPrimaryKey(), JSON_UNESCAPED_UNICODE));
        } elseif ($validPrimaryKeyFKs) {
            return crc32(json_encode($primaryKeyFKs, JSON_UNESCAPED_UNICODE));
        }

        return spl_object_hash($this);
    }
294342
public function getKey() {
        if (empty($this->key)) {
            return null;
        }
        return substr($this->key, 0, $this->getKeySize());
    }
1213932
public function hashCode()
    {
        $validPk = null !== $this->getRoleId() &&
            null !== $this->getPermissionId();

        $validPrimaryKeyFKs = 2;
        $primaryKeyFKs = [];

        //relation role_permission_fk_1ff99e to table role
        if ($this->aRole && $hash = spl_object_hash($this->aRole)) {
            $primaryKeyFKs[] = $hash;
        } else {
            $validPrimaryKeyFKs = false;
        }

        //relation role_permission_fk_2b894c to table permission
        if ($this->aPermission && $hash = spl_object_hash($this->aPermission)) {
            $primaryKeyFKs[] = $hash;
        } else {
            $validPrimaryKeyFKs = false;
        }

        if ($validPk) {
            return crc32(json_encode($this->getPrimaryKey(), JSON_UNESCAPED_UNICODE));
        } elseif ($validPrimaryKeyFKs) {
            return crc32(json_encode($primaryKeyFKs, JSON_UNESCAPED_UNICODE));
        }

        return spl_object_hash($this);
    }
42338
protected function getId()
    {
        if ($key = $this->manager->config('model_primary_key')) {
            return $this->manager->getInstance()->{$key};
        }

        return $this->manager->getInstance()->getKey();
    }
150752
public function key() {
		$keys = array_keys($this->data);
		return isset($keys[$this->position]) ? $keys[$this->position] : null;
	}