CakeDC / cakephp-oracle-driver

CakePHP 3 Driver for Oracle Database
Other
40 stars 24 forks source link

Oracle Field XMLTYPE #14

Closed sfalke closed 7 years ago

sfalke commented 7 years ago

In one of my tables I have a field of type XMLTYPE. Retrieving this, throws the Exception "Unsupported File Type". As soon as I delete the field from the table everything works fine. Do you know this error, and do you know any workaround? Checked my whole System and I'm afraid the error comes from the oracle driver.

skie commented 7 years ago

Yes we dont have xmltype field support

sfalke commented 7 years ago

thanx for closing without a solution ;-) I found a workaround myself. Just added the following lines to the file Database/Schema/OracleSchema.php to the functioin convertColumnDescription:

switch ($row['type']){
         ....
            case 'XMLTYPE':
                $field = [
                    'type' => 'xmltype',
                    'length' => $row['char_length']
                    ];
                break;
     ...
}

works for me