private function resolveAssociations(Entity $config, ClassMetadata $metadata)
    {
        $associations = [];
        foreach ($metadata->getAssociationMappings() as $associationMapping) {
            $fieldName = $associationMapping['fieldName'];
            $fieldClass = array_filter($config->listFields(), function (ListField $field) use ($fieldName) {
                if (!isset($field->options()['field'])) {
                    return;
                }

                return $fieldName === explode('.', $field->options()['field'])[0];
            });

            if (count($fieldClass) > 0) {
                $associations[] = $fieldName;
            }
        }

        return $associations;
    }
private function resolveAssociations(Entity $config, ClassMetadata $metadata)
    {
        $associations = [];
        foreach ($metadata->getAssociationMappings() as $associationMapping) {
            $fieldName = $associationMapping['fieldName'];
            $fieldClass = array_filter($config->listFields(), function (ListField $field) use ($fieldName) {
                if (!isset($field->options()['field'])) {
                    return;
                }

                return $fieldName === explode('.', $field->options()['field'])[0];
            });

            if (count($fieldClass) > 0) {
                $associations[] = $fieldName;
            }
        }

        return $associations;
    }
private function resolveAssociations ( Entity $ config , ClassMetadata $ metadata ) { $ associations = [ ] ; foreach ( $ metadata -> getAssociationMappings ( ) as $ associationMapping ) { $ fieldName = $ associationMapping [ 'fieldName' ] ; $ fieldClass = array_filter ( $ config -> listFields ( ) , function ( ListField $ field ) use ( $ fieldName ) { if ( ! isset ( $ field -> options ( ) [ 'field' ] ) ) { return ; } return $ fieldName === explode ( '.' , $ field -> options ( ) [ 'field' ] ) [ 0 ] ; } ) ; if ( count ( $ fieldClass ) > 0 ) { $ associations [ ] = $ fieldName ; } } return $ associations ; }
Resolves associations.

@param Entity        $config   The entity configuration
@param ClassMetadata $metadata The class metadata

@return array
Resolves associations .