DBAL-61: Incompatible transactions in OCI8 driver with other drivers (pdo_oci, pdo_mysql, pdo_pgsql) #1824

Closed
doctrinebot opened this Issue Nov 9, 2010 · 3 comments

2 participants

@doctrinebot

Jira issue originally created by user adrive:

When I try to insert some data, it is not saved into database.

$connectionOptions['oci8'] = array(
    'driver' => 'oci8',
    'dbname' => 'BOOK',
    'user' => 'doctrine',
    'password' => 'doctrine',
//    'charset' => 'AL32UTF8',
);

$em = EntityManager::create($connectionOptions['oci8'], $config, $evm);
$conn = $em->getConnection();
$conn->connect();
$conn->insert('my*table', array('my*column' => 'Some value'));

When I invoke the previous code on any other DBAL driver, like pdooci, pdo_mysql, pdopgsql, the row is inserted.

That's because Oracle is transactional, and everything need to be commited. This behavior prevent's me (and I think in a feature not only me), to use 3rd party code (bundles, models, plugins...) in my applications running oracle. This behavior prevents developers to write portable code with DBAL. The solution is to make OCI8Driver commit everything after invoking ociexecute(), the same way how Doctrine_AdapterOracle works in Doctrine1. (https://github.com/doctrine/doctrine1/blob/master/lib/Doctrine/Adapter/Oracle.php)

@doctrinebot

Comment created by @beberlei:

Scheduled for RC1, thanks for the patch - I will apply asap.

@doctrinebot

Comment created by @beberlei:

Fixed

@doctrinebot

Issue was closed with resolution "Fixed"

@doctrinebot doctrinebot added the Bug label Dec 7, 2015
@beberlei beberlei was assigned by doctrinebot Dec 7, 2015
@doctrinebot doctrinebot added this to the 2.0.0-RC1-RC3 milestone Dec 7, 2015
@doctrinebot doctrinebot closed this Dec 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment