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 . "!"
        );
    }