Use Doctrines Oracle sequence suffix

This commit is contained in:
Bart Visscher 2013-06-21 15:41:10 +02:00
parent 159efa8bd4
commit 9fa4b78ba4
1 changed files with 10 additions and 2 deletions

View File

@ -322,12 +322,20 @@ class OC_DB {
$row = $result->fetchRow();
self::raiseExceptionOnError($row, 'fetching row for insertid failed');
return $row['id'];
} else if( $type === 'mssql' || $type === 'oci') {
} else if( $type === 'mssql') {
if($table !== null) {
$prefix = OC_Config::getValue( "dbtableprefix", "oc_" );
$table = str_replace( '*PREFIX*', $prefix, $table );
}
self::$connection->lastInsertId($table);
return self::$connection->lastInsertId($table);
}
if( $type === 'oci' ) {
if($table !== null) {
$prefix = OC_Config::getValue( "dbtableprefix", "oc_" );
$suffix = '_SEQ';
$table = '"'.str_replace( '*PREFIX*', $prefix, $table ).$suffix.'"';
}
return self::$connection->lastInsertId($table);
} else {
if($table !== null) {
$prefix = OC_Config::getValue( "dbtableprefix", "oc_" );