Bravo3\Orm\KeySchemes\StandardKeyScheme::getRelationshipKey PHP Method

getRelationshipKey() public method

Get the key for a foreign relationship
public getRelationshipKey ( Relationship $relationship, string $source_table, string $target_table, string $id ) : string
$relationship Bravo3\Orm\Mappers\Metadata\Relationship Relationship
$source_table string Source table name
$target_table string Target table name
$id string Source entity ID
return string
    public function getRelationshipKey(Relationship $relationship, $source_table, $target_table, $id)
    {
        // otm:user-address:89726:home_address
        return (string) $relationship->getRelationshipType()->value() . $this->delimiter . $source_table . '-' . $target_table . $this->delimiter . $id . $this->delimiter . $relationship->getName();
    }