src/Formatter.php
public function getHasManyDbValue(RelationshipMetadata $relMeta, array $models = null)
    {
        if (null === $models || true === $relMeta->isInverse) {
            return null;
        }
        $references = [];
        foreach ($models as $model) {
            $references[] = $this->createReference($relMeta, $model);
        }
        return empty($references) ? null : $references;
    }
public function getHasManyDbValue(RelationshipMetadata $relMeta, array $models = null)
    {
        if (null === $models || true === $relMeta->isInverse) {
            return null;
        }
        $references = [];
        foreach ($models as $model) {
            $references[] = $this->createReference($relMeta, $model);
        }
        return empty($references) ? null : $references;
    }
public function getHasManyDbValue ( RelationshipMetadata $ relMeta , array $ models = null ) { if ( null === $ models || true === $ relMeta -> isInverse ) { return null ; } $ references = [ ] ; foreach ( $ models as $ model ) { $ references [ ] = $ this -> createReference ( $ relMeta , $ model ) ; } return empty ( $ references ) ? null : $ references ; }
Prepares and formats a has-many relationship model set for proper insertion into the database.

@param   RelationshipMetadata    $relMeta
@param   Model[]|null            $models
@return  mixed
Prepares and formats a has - many relationship model set for proper insertion into the database .