source/Spiral/ORM/Entities/RecordSelector.php
public function wherePK($id): self
    {
        if (empty($this->loader->primaryKey())) {
            //This MUST never happen due ORM requires PK now for every entity
            throw new SelectorException("Unable to set wherePK condition, no proper PK were defined");
        }

        //Adding condition to initial query
        $this->loader->initialQuery()->where([
            //Must be already aliased
            $this->loader->primaryKey() => $id
        ]);

        return $this;
    }
public function wherePK($id): self
    {
        if (empty($this->loader->primaryKey())) {
            //This MUST never happen due ORM requires PK now for every entity
            throw new SelectorException("Unable to set wherePK condition, no proper PK were defined");
        }

        //Adding condition to initial query
        $this->loader->initialQuery()->where([
            //Must be already aliased
            $this->loader->primaryKey() => $id
        ]);

        return $this;
    }
public function wherePK ( $ id ) : self { if ( empty ( $ this -> loader -> primaryKey ( ) ) ) { //This MUST never happen due ORM requires PK now for every entity throw new SelectorException ( "Unable to set wherePK condition, no proper PK were defined" ) ; } //Adding condition to initial query $ this -> loader -> initialQuery ( ) -> where ( [ //Must be already aliased $ this -> loader -> primaryKey ( ) => $ id ] ) ; return $ this ; }
Shortcut to where method to set AND condition for parent record primary key.

@param string|int $id

@return RecordSelector

@throws SelectorException
Shortcut to where method to set AND condition for parent record primary key .