private function removeMappingsFromTraits(ClassMetadata $metadata): void
    {
        $traits = $this->getTraits($metadata->name);

        foreach ($traits as $trait) {
            $trait = new \ReflectionClass($trait);

            /**
             * @var \ReflectionProperty $property
             */
            foreach ($trait->getProperties() as $property) {
                $name = $property->getName();

                if (isset($metadata->fieldMappings[$name])) {
                    $mapping = $metadata->fieldMappings[$name];

                    unset(
                        $metadata->fieldMappings[$name],
                        $metadata->fieldNames[$mapping['columnName']],
                        $metadata->columnNames[$name]
                    );
                }
            }
        }
    }
private function removeMappingsFromTraits(ClassMetadata $metadata): void
    {
        $traits = $this->getTraits($metadata->name);

        foreach ($traits as $trait) {
            $trait = new \ReflectionClass($trait);

            /**
             * @var \ReflectionProperty $property
             */
            foreach ($trait->getProperties() as $property) {
                $name = $property->getName();

                if (isset($metadata->fieldMappings[$name])) {
                    $mapping = $metadata->fieldMappings[$name];

                    unset(
                        $metadata->fieldMappings[$name],
                        $metadata->fieldNames[$mapping['columnName']],
                        $metadata->columnNames[$name]
                    );
                }
            }
        }
    }
private function removeMappingsFromTraits ( ClassMetadata $ metadata ) : void { $ traits = $ this -> getTraits ( $ metadata -> name ) ; foreach ( $ traits as $ trait ) { $ trait = new \ ReflectionClass ( $ trait ) ; /**
             * @var \ReflectionProperty $property
             */ foreach ( $ trait -> getProperties ( ) as $ property ) { $ name = $ property -> getName ( ) ; if ( isset ( $ metadata -> fieldMappings [ $ name ] ) ) { $ mapping = $ metadata -> fieldMappings [ $ name ] ; unset ( $ metadata -> fieldMappings [ $ name ] , $ metadata -> fieldNames [ $ mapping [ 'columnName' ] ] , $ metadata -> columnNames [ $ name ] ) ; } } } }
Remove fields in Go! AOP proxied class metadata that are inherited
from traits.
Remove fields in Go! AOP proxied class metadata that are inherited from traits .