src/ORM/DatabaseAdmin.php
protected function getClassNameRemappingFields()
    {
        $dataClasses = ClassInfo::getValidSubClasses(DataObject::class);
        $schema = DataObject::getSchema();
        $remapping = [];

        foreach ($dataClasses as $className) {
            $fieldSpecs = $schema->fieldSpecs($className);
            foreach ($fieldSpecs as $fieldName => $fieldSpec) {
                if (Injector::inst()->create($fieldSpec, 'Dummy') instanceof DBClassName) {
                    $remapping[$className][] = $fieldName;
                }
            }
        }

        return $remapping;
    }
protected function getClassNameRemappingFields()
    {
        $dataClasses = ClassInfo::getValidSubClasses(DataObject::class);
        $schema = DataObject::getSchema();
        $remapping = [];

        foreach ($dataClasses as $className) {
            $fieldSpecs = $schema->fieldSpecs($className);
            foreach ($fieldSpecs as $fieldName => $fieldSpec) {
                if (Injector::inst()->create($fieldSpec, 'Dummy') instanceof DBClassName) {
                    $remapping[$className][] = $fieldName;
                }
            }
        }

        return $remapping;
    }
protected function getClassNameRemappingFields ( ) { $ dataClasses = ClassInfo :: getValidSubClasses ( DataObject :: class ) ; $ schema = DataObject :: getSchema ( ) ; $ remapping = [ ] ; foreach ( $ dataClasses as $ className ) { $ fieldSpecs = $ schema -> fieldSpecs ( $ className ) ; foreach ( $ fieldSpecs as $ fieldName => $ fieldSpec ) { if ( Injector :: inst ( ) -> create ( $ fieldSpec , 'Dummy' ) instanceof DBClassName ) { $ remapping [ $ className ] [ ] = $ fieldName ; } } } return $ remapping ; }
Find all DBClassName fields on valid subclasses of DataObject that should be remapped. This includes
`ClassName` fields as well as polymorphic class name fields.

@return array[]
Find all DBClassName fields on valid subclasses of DataObject that should be remapped . This includes ClassName fields as well as polymorphic class name fields .