src/Entity/Reflection.php
public function getPrimaryProperty()
    {
        foreach ($this->properties as $property) {

            if ($property->hasOption(Entity\Reflection\Property\Option\Primary::KEY)) {
                return $property;
            }
        }
        throw new \Exception(
            "Primary property not defined in " . $this->className . "!"
        );
    }
public function getPrimaryProperty()
    {
        foreach ($this->properties as $property) {

            if ($property->hasOption(Entity\Reflection\Property\Option\Primary::KEY)) {
                return $property;
            }
        }
        throw new \Exception(
            "Primary property not defined in " . $this->className . "!"
        );
    }
public function getPrimaryProperty ( ) { foreach ( $ this -> properties as $ property ) { if ( $ property -> hasOption ( Entity \ Reflection \ Property \ Option \ Primary :: KEY ) ) { return $ property ; } } throw new \ Exception ( "Primary property not defined in " . $ this -> className . "!" ) ; }
Get primary property reflection

@return Reflection\Property

@throws \Exception
Get primary property reflection