source/Spiral/ORM/Schemas/RelationBuilder.php
public function inverseRelations(SchemaBuilder $builder)
    {
        /**
         * Inverse process is relation specific.
         */
        foreach ($this->relations as $relation) {
            $definition = $relation->getDefinition();

            if ($definition->needInversion()) {
                if (!$relation instanceof InversableRelationInterface) {
                    throw new DefinitionException(sprintf(
                        "Unable to inverse relation '%s'.'%s', relation schema '%s' is non inversable",
                        $definition->sourceContext()->getClass(),
                        $definition->getName(),
                        get_class($relation)
                    ));
                }

                $inversed = $relation->inverseDefinition($builder, $definition->getInverse());
                foreach ($inversed as $definition) {
                    $this->registerRelation($builder, $definition);
                }
            }
        }
    }
public function inverseRelations(SchemaBuilder $builder)
    {
        /**
         * Inverse process is relation specific.
         */
        foreach ($this->relations as $relation) {
            $definition = $relation->getDefinition();

            if ($definition->needInversion()) {
                if (!$relation instanceof InversableRelationInterface) {
                    throw new DefinitionException(sprintf(
                        "Unable to inverse relation '%s'.'%s', relation schema '%s' is non inversable",
                        $definition->sourceContext()->getClass(),
                        $definition->getName(),
                        get_class($relation)
                    ));
                }

                $inversed = $relation->inverseDefinition($builder, $definition->getInverse());
                foreach ($inversed as $definition) {
                    $this->registerRelation($builder, $definition);
                }
            }
        }
    }
public function inverseRelations ( SchemaBuilder $ builder ) { /**
         * Inverse process is relation specific.
         */ foreach ( $ this -> relations as $ relation ) { $ definition = $ relation -> getDefinition ( ) ; if ( $ definition -> needInversion ( ) ) { if ( ! $ relation instanceof InversableRelationInterface ) { throw new DefinitionException ( sprintf ( "Unable to inverse relation '%s'.'%s', relation schema '%s' is non inversable" , $ definition -> sourceContext ( ) -> getClass ( ) , $ definition -> getName ( ) , get_class ( $ relation ) ) ) ; } $ inversed = $ relation -> inverseDefinition ( $ builder , $ definition -> getInverse ( ) ) ; foreach ( $ inversed as $ definition ) { $ this -> registerRelation ( $ builder , $ definition ) ; } } } }
Create inverse relations where needed.

@param SchemaBuilder $builder

@throws DefinitionException
Create inverse relations where needed .