src/ORM/FieldType/DBComposite.php
public function dbObject($field)
    {
        $fields = $this->compositeDatabaseFields();
        if (!isset($fields[$field])) {
            return null;
        }

        // Build nested field
        $key = $this->getName() . $field;
        $spec = $fields[$field];
        /** @var DBField $fieldObject */
        $fieldObject = Injector::inst()->create($spec, $key);
        $fieldObject->setValue($this->getField($field), null, false);
        return $fieldObject;
    }
public function dbObject($field)
    {
        $fields = $this->compositeDatabaseFields();
        if (!isset($fields[$field])) {
            return null;
        }

        // Build nested field
        $key = $this->getName() . $field;
        $spec = $fields[$field];
        /** @var DBField $fieldObject */
        $fieldObject = Injector::inst()->create($spec, $key);
        $fieldObject->setValue($this->getField($field), null, false);
        return $fieldObject;
    }
public function dbObject ( $ field ) { $ fields = $ this -> compositeDatabaseFields ( ) ; if ( ! isset ( $ fields [ $ field ] ) ) { return null ; } // Build nested field $ key = $ this -> getName ( ) . $ field ; $ spec = $ fields [ $ field ] ; /** @var DBField $fieldObject */ $ fieldObject = Injector :: inst ( ) -> create ( $ spec , $ key ) ; $ fieldObject -> setValue ( $ this -> getField ( $ field ) , null , false ) ; return $ fieldObject ; }
Get a db object for the named field

@param string $field Field name
@return DBField|null
Get a db object for the named field