public function getPrimaryKeyName()
    {
        if (!isset($this->primaryKeyName)) {
            // lazy load
            $memory = $this->getDI()->get('memory');
            $attributes = $memory->getPrimaryKeyAttributes($this);
            $attributeKey = $attributes[0];

            // adjust for colMaps if any are provided
            $colMap = $memory->getColumnMap($this);
            if (is_null($colMap)) {
                $this->primaryKeyName = $attributeKey;
            } else {
                $this->primaryKeyName = $colMap[$attributeKey];
            }
        }
        return $this->primaryKeyName;
    }
public function getPrimaryKeyName()
    {
        if (!isset($this->primaryKeyName)) {
            // lazy load
            $memory = $this->getDI()->get('memory');
            $attributes = $memory->getPrimaryKeyAttributes($this);
            $attributeKey = $attributes[0];

            // adjust for colMaps if any are provided
            $colMap = $memory->getColumnMap($this);
            if (is_null($colMap)) {
                $this->primaryKeyName = $attributeKey;
            } else {
                $this->primaryKeyName = $colMap[$attributeKey];
            }
        }
        return $this->primaryKeyName;
    }
public function getPrimaryKeyName ( ) { if ( ! isset ( $ this -> primaryKeyName ) ) { // lazy load $ memory = $ this -> getDI ( ) -> get ( 'memory' ) ; $ attributes = $ memory -> getPrimaryKeyAttributes ( $ this ) ; $ attributeKey = $ attributes [ 0 ] ; // adjust for colMaps if any are provided $ colMap = $ memory -> getColumnMap ( $ this ) ; if ( is_null ( $ colMap ) ) { $ this -> primaryKeyName = $ attributeKey ; } else { $ this -> primaryKeyName = $ colMap [ $ attributeKey ] ; } } return $ this -> primaryKeyName ; }
will return the primary key name for a given model

@return string
will return the primary key name for a given model