public function relation(string $property): RelationUsingDefiner
    {
        $this->verifyProperty(__METHOD__, $property);

        $accessor = new PropertyAccessor($this->class->getClassName(), $this->class->getProperty($property));

        return $this->defineRelationVia($accessor, function () use ($property) {
            $this->mappedProperties[$property] = true;
        });
    }
public function relation(string $property): RelationUsingDefiner
    {
        $this->verifyProperty(__METHOD__, $property);

        $accessor = new PropertyAccessor($this->class->getClassName(), $this->class->getProperty($property));

        return $this->defineRelationVia($accessor, function () use ($property) {
            $this->mappedProperties[$property] = true;
        });
    }
public function relation ( string $ property ) : RelationUsingDefiner { $ this -> verifyProperty ( __METHOD__ , $ property ) ; $ accessor = new PropertyAccessor ( $ this -> class -> getClassName ( ) , $ this -> class -> getProperty ( $ property ) ) ; return $ this -> defineRelationVia ( $ accessor , function ( ) use ( $ property ) { $ this -> mappedProperties [ $ property ] = true ; } ) ; }
Defines a relationship property.

@param string $property

@return RelationUsingDefiner
@throws InvalidArgumentException
Defines a relationship property .