source/Spiral/ORM/Schemas/RelationBuilder.php
public function packRelations(string $class, SchemaBuilder $builder): array
    {
        $result = [];
        foreach ($this->relations as $relation) {
            $definition = $relation->getDefinition();

            if ($definition->sourceContext()->getClass() == $class) {
                //Packing relation, relation schema are given with associated table
                $result[$definition->getName()] = $relation->packRelation($builder);
            }
        }

        return $result;
    }
public function packRelations(string $class, SchemaBuilder $builder): array
    {
        $result = [];
        foreach ($this->relations as $relation) {
            $definition = $relation->getDefinition();

            if ($definition->sourceContext()->getClass() == $class) {
                //Packing relation, relation schema are given with associated table
                $result[$definition->getName()] = $relation->packRelation($builder);
            }
        }

        return $result;
    }
public function packRelations ( string $ class , SchemaBuilder $ builder ) : array { $ result = [ ] ; foreach ( $ this -> relations as $ relation ) { $ definition = $ relation -> getDefinition ( ) ; if ( $ definition -> sourceContext ( ) -> getClass ( ) == $ class ) { //Packing relation, relation schema are given with associated table $ result [ $ definition -> getName ( ) ] = $ relation -> packRelation ( $ builder ) ; } } return $ result ; }
Pack relation schemas for specific model class in order to be saved in memory.

@param string        $class
@param SchemaBuilder $builder

@return array
Pack relation schemas for specific model class in order to be saved in memory .